Re: Regex exactly 0, 1 or 2 matches, {0,2} not working
- From: "GGB667" <ggb667@xxxxxxxxx>
- Date: 22 Nov 2006 14:47:07 -0800
I was really hoping to keep it as a pure regular expression. What I've
ended up doing was having a boatload of different expressions, EX: one
with a comma, 1 with a comma and a space, one with a comma, space and
number 1-9, and one with a comma, space, number 1-9 and 0-5 and one
with all that and a-f after it. I also have one with - or --. It's
ugly. Now here's the kicker. The numbers are not allowed to be
identical!
So 1a, 2b is OK, but 1a, 1f is not!
I have absolutely no idea how to implement that unless I use a program.
So basically how can you make a regular expression with 2 DIFFERENT
numbers?
I thought there was some backreference thing you could use, but I can't
seem to get it to work.
So say 1,5 or 1,3 or 1,7 but not 2,2 or 1,1.
AURGH!
.
- Follow-Ups:
- Re: Regex exactly 0, 1 or 2 matches, {0,2} not working
- From: Ben Morrow
- Re: Regex exactly 0, 1 or 2 matches, {0,2} not working
- Prev by Date: Re: How to declare a var hash name ?
- Next by Date: Re: Export module
- Previous by thread: FAQ 7.6 What's an extension?
- Next by thread: Re: Regex exactly 0, 1 or 2 matches, {0,2} not working
- Index(es):
Relevant Pages
|