Hello,
I need help with a regular expression
the search text is as folows:
-LHR010Y-PAD100
A quick breakdown LHR is airport code which has to be 3
chars
010 is a number which can be 2-3 digits long
-PAD is literal string
and the 100 after it is a number which can be 1-3 digits
long
I know how to do the regex if i split the string in two but
the
problem is i can't
get the regex right for the whole expression. You see the
-PAD100 is
optional
but the -LHR010Y is the mandatory part of the expression. An
Example
-LHR010Y - valid
-LHR010Y-PAD100 valid
-LHR010Y- invalid
LHR010Y-PAD invalid
i can't get it to not match when the second part is invalid.
It always
still matches the first
part. HELP i need to get this right. How do you force a non
match when
the second
half of the search text does not match the second part of
your regex?
Regards
Romeel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|