Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I want to find the first occurance of pattern matching for "year". How can i do that?
$var='<x><year>2010<day>5</day></year><month>January</month> <day>31</ +day>, <year>2010</year></x>'; $var=~/<year>(.+)<\/year>/; print $1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern match of first occurance
by johngg (Canon) on Jul 08, 2010 at 10:41 UTC | |
by rdfield (Priest) on Jul 08, 2010 at 13:57 UTC | |
by deMize (Monk) on Jul 08, 2010 at 20:47 UTC | |
by rdfield (Priest) on Jul 15, 2010 at 15:06 UTC | |
|
Re: pattern match of first occurance
by Anonymous Monk on Jul 08, 2010 at 10:36 UTC |