zerocred has asked for the wisdom of the Perl Monks concerning the following question:
I use it like this - or at least this works if the regex is all one one line.my $regex =' ^(\w*)?\s (\w*)?\s (\w*)?\s (?:([A-Z]*)\s)? (\d+)\* (?:([0-9+]+)[>])? ([0-9+]+)\s. (\d*) ';
$input_string=~m/$regex/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to write a multi-line regex
by holli (Abbot) on Jan 22, 2010 at 00:04 UTC | |
|
Re: how to write a multi-line regex
by Utilitarian (Vicar) on Jan 22, 2010 at 00:12 UTC | |
|
Re: how to write a multi-line regex
by rkrieger (Friar) on Jan 22, 2010 at 00:19 UTC | |
by zerocred (Beadle) on Jan 22, 2010 at 08:06 UTC | |
by johngg (Canon) on Jan 22, 2010 at 11:55 UTC | |
by zerocred (Beadle) on Jan 25, 2010 at 14:12 UTC |