AntsPants has asked for the wisdom of the Perl Monks concerning the following question:
I have a regex that just doesn;t do what I think it should, no matter how loud I read out in English what it should be doing ;)
Trying to match blah/blah/blah#ThisIsWhatIWant?ButNotThisEtc
#(.*[^\?]) doesn't work
Whereas
#([\w]+[^\?]) does work!!
the one that fails, I've tried a host of ways including
#(.*)\[^\?\] #(.+)\[^\?\] .... and more
But I keep getting ThisIsWhatIWant?ButNotThisEtc matched
Any pointers would be terrrrrrrrrific.
Merci
-Ants
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regexp Confuzzelemt
by suaveant (Parson) on Apr 27, 2007 at 14:20 UTC | |
|
Re: Regexp Confuzzelemt
by bobf (Monsignor) on Apr 27, 2007 at 14:26 UTC | |
|
Re: Regexp Confuzzelemt
by jettero (Monsignor) on Apr 27, 2007 at 14:19 UTC | |
|
Re: Regexp Confuzzelemt
by akho (Hermit) on Apr 27, 2007 at 21:41 UTC | |
by ikegami (Patriarch) on Apr 28, 2007 at 02:37 UTC |