|
-
Dec 13th, 2005, 05:26 PM
#1
[RESOLVED] RegEx Question
(([0])?[1-9])|[1][0-2]
This will allow any digit 1 through 9 and also allow it to lead with a zero. I run into a problem when I try to do 10, 11 and 12. Those cases are the ones I specified right of the alteration character (atleast, I thought?).
What am I doing wrong, why doesn't that match? Since it's an alteration, I figured it would work just like an "or" and ignore everything on the left. Am I missing something obvious? 
Edit:
I just tried:
(([0])?[1-9])|1[0-2]
Same problem...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|