in reply to repeating patterns 2
Just to immortalize my chatterbox fumblings, let me suggest this:
my @matches; foreach ( split "foo", $string) { push @matches, $1 if /(.*)tarbar/; }
grabs all the (stuff)s, each of which is guaranteed not to contain "foo". If you don't want "tarbar"s embedded in the (stuff)s you get, make that a non-greedy match.
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|