I need a regular expression that would validate string like this.
aa5677
Any 2 literal characters and then any amount of digits from 1 to ...
aa345k is not valid.
Can someone write this for me.
Thanks
George.
> I need a regular expression that would validate string like this.
>
[quoted text clipped - 7 lines]
> Thanks
> George.
^[a-zA-Z]{2}\d*$
George Ter-Saakov - 16 Aug 2007 19:46 GMT
Thanks, saved me one headache today :)
George.
>> I need a regular expression that would validate string like this.
>>
[quoted text clipped - 9 lines]
>
> ^[a-zA-Z]{2}\d*$
> any amount of digits from 1 to ...
Ah, change ( * ) to ( + ), like this
^[a-zA-Z]{2}\d+$
it will require at least one digit
George Ter-Saakov - 16 Aug 2007 19:59 GMT
Yea, thanks
I figured that one myself
After an hour of reading MSDN I gave up and wrote to you guys. But now I
know something about Regex
George.
>> any amount of digits from 1 to ...
>
[quoted text clipped - 3 lines]
>
> it will require at least one digit