in reply to Re: Getting regular expression right
in thread Getting regular expression right
I cannot get this example working? And should @key be %key?if (/$_[0] =~ /^([^:]+):([^|]+)(?:\|(.*))?$/ || $_[0] =~ /^([^|)+)\|(.*)$/) { @key{qw /name definition altdefinition/} = ($1, $2, defined $3 ? $ +3 : "") }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting regular expression right
by Anonymous Monk on Feb 15, 2005 at 12:12 UTC | |
by mellin (Scribe) on Feb 15, 2005 at 12:25 UTC | |
by Anonymous Monk on Feb 15, 2005 at 13:08 UTC |