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...
In reply to help with regex by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |