in reply to Re^2: help with regex
in thread help with regex
while(<DATA>) { chomp; if (/string=\"(\d+)\"|static-address\/(.*?)\"/) { my $id = $1 ? $1 : $2; print "ONE: $id\n"; } } __DATA__ static string="123456" containing numbers html value <a href="static-address/foo">text</a>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: help with regex
by ikegami (Patriarch) on Mar 27, 2009 at 16:29 UTC |