Scanset behaviour in scanf in C
===

I tried to do some stuff with scanset in scanf but stuck somehwere..plz help me

when i write
char s1[250];

    scanf("%[A-Z]s",s1);

input : AHJHkiuy

Output: AHJH

and with this,

    scanf("%[^\n]s",s1);
input: abcd ABCD hie

output: abcd ABCD hie       /*that is reading white space also (till \n) */

Now My question is 
if i give input as : ABCDahaj ahajABCD ajak12347ab

and wants the output as : ABCDahaj ahajABCD ajak

then how scanf should be written that is how this scanset should be used?