in reply to use of 'or' in regex
is:$str = "ABCDEFGHIJKLM"; while ($str =~ /(BC|GH|LM)/g) { print "matched $1\n"; }
Which I think is what you needed. You'll get a match line for each of them, so long as they don't overlap.matched BC matched GH matched LM
--
Steve Marvell
|
|---|