Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would expect the output to be:while(<DATA>) { chomp; if (/string=\"(\d+)\"|static-address\/(.*?)\"/) { print "ONE: $1\n"; } } __DATA__ static string="123456" containing numbers html value <a href="static-address/foo">text</a>
ONE: 123456 ONE: foo
I'm missing something...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help with regex
by moritz (Cardinal) on Mar 27, 2009 at 13:11 UTC | |
by Anonymous Monk on Mar 27, 2009 at 13:14 UTC | |
by Anonymous Monk on Mar 27, 2009 at 13:16 UTC | |
by ikegami (Patriarch) on Mar 27, 2009 at 16:29 UTC | |
|
Re: help with regex
by jwkrahn (Abbot) on Mar 27, 2009 at 15:59 UTC | |
by AnomalousMonk (Archbishop) on Mar 27, 2009 at 20:40 UTC | |
|
Re: help with regex
by JavaFan (Canon) on Mar 27, 2009 at 16:25 UTC |