in reply to About regular expression
(code deleted)
Second, let's break it down:
In a nutshell this will match the "extension" of the data you provided, i.e. the "five" in "one.five" or the "12" in "two.ten.12". What's matched is captured into $label.my ($label) =~ / # begin \. # find a literal . ( # start capturing [^\.] # Any character that isn't a \ or . * # zero or more ) # stop capturing $ # only match from the end of the string / # end;
There's lots of info on regexes both here and in the regular Perl documentation. They can be challenging at first, but are well worth the effort to figure out. :-D
Gary Blackburn
Trained Killer
Edited
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: About regular expression
by abstracts (Hermit) on Mar 15, 2002 at 03:08 UTC | |
by Trimbach (Curate) on Mar 15, 2002 at 03:12 UTC | |
Re: Re: About regular expression
by Juerd (Abbot) on Mar 15, 2002 at 21:13 UTC |
In Section
Seekers of Perl Wisdom