hi
I have strings like:
"rag/1998a"
"rag/2007c"
"rag/2008a"
"rag/2008b"
"rag/2012a"
"rag/2013a"
"rag/2212c"
the last letter can be either "a" , "b" or "c"
I need to capture all stings which the nubmer in them is smaller than 2012
for example , these should match my regexp:
"rag/1998a"
"rag/2007c"
"rag/2008a"
"rag/2008b"
the other will not.
what's the regexp for that?
I tried this:
"rag/[0-2011][abc]"
didn't work.
help please?
number bellow 2012 in a string
Moderator: General Moderators
Re: number bellow 2012 in a string
Code: Select all
rag/([01]?[0-9]{1,3}|20(0[0-9]|1[01]))[abc]Re: number bellow 2012 in a string
I thank you very much