in reply to Re^2: Multiple regex matches in single string
in thread Multiple regex matches in single string
use strict; use warnings; my $string = <<'EOT'; start start start go one end start start start go two end EOT my $rxGroup = qr {(?isx) ( start (?!\nstart) .+? end ) }; print qq{$1\n\n} while $string =~ m{$rxGroup}g;
The output.
start go one end start go two end
I hope I am correct and this slight change will speed up your code.
Cheers,
JohnGG
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Multiple regex matches in single string
by hipowls (Curate) on Apr 26, 2008 at 23:33 UTC |