On Feb 21, 2006, at 11:30, Oliver Taylor wrote:
I don't know where else to turn for help with regex,
There's freenode#regex.
so I turn to you. Consider the following:
ONCE (twice) Three times a lady. Not as much as the Gambler. (This sucks) How would you know?
How do I match the 2nd line but not the 5th? How do I match the 6th, but not he 3rd?
What is different in each case? The presence of ONCE exactly in the line before?
P.S. Do you guys have any really good references for regex (aside from the manuel), where I can hunt down problems like this?
You could read the Perl tutorials, there's some Perl there of course, but just a minimum:
$ perldoc perlrequick $ perldoc perlretut
There's a handy quick reference as well (with some Perlisms):
$ perldoc perlreref
I don't know whether TM supports the most "advanced" idioms, but in any case it will help you to get started for sure.
-- fxn