in reply to multiple matches with regexp
You can do this by doing a global match and resetting pos on each iteration to the position after the match, like this:
$_ = "aaaaa"; while (/aa/g) { print "Match at $-[0]\n"; pos = $-[0] + 1; }
-- Mike
--
XML::Simpler does not require XML::Parser or a SAX parser.
It does require File::Slurp.
-- grantm, perldoc XML::Simpler
|
|---|