http://qs321.pair.com?node_id=848695


in reply to Re: pattern match of first occurance
in thread pattern match of first occurance

Or match only digits:
say $1 if $var =~m{<year>(\d+)</year>};

rdfield

Replies are listed 'Best First'.
Re^3: pattern match of first occurance
by deMize (Monk) on Jul 08, 2010 at 20:47 UTC
    Comment: Nope he said he's trying to get:
    2010<day>5</day>



    Demize
      Actually, no, he's not. The question was specifically why <year>.*</year> didn't match properly.

      rdfield