2011-07-18
02:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
RegEx Help?
Trying to match a string:
examples:
s1281
s0621
s0998
s1829
s2199
I want to match s0000-s9999 WITH THE EXCLUSION OF s0998. All other numbers in that range should match the regex...
Is there any easy way to write a single regex that matches this condition?
1 Reply
2011-07-18
06:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I think that it is going to be pretty messy if you want to match everything except s0998 with regex. Here is a link to numeric ranges that might help:
http://www.regular-expressions.info/numericranges.html
However, if you are doing this for envision, you could just say NOT like s0998 and that would exclude that identifier.
