Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Regex question
April 18, 2005, 2:50 pm
rate this thread
I am having a lot of trouble creaing the following regex :
Match a quoted string unless it is preceded by '--', the '--' can only
be preceded by whitespace.
e.g for a target string of :
"1x:" should be matched
for a target string of :
-- DISPLAY-HINT "1x:"
nothing should be matched.
Any help would be much appreciated.
Re: Regex question
Do I understand this correctly... when you say "1x" should be matched,
do you want to capture this value? If then the following will ignore
white-space at the start of the string, not match '--' at the start of
The captured valuer will be in $1.