in reply to Efficiency in regex
my @names = qw(Jones Rogers Edwards Smith Jackson) ; my $names_re = join("|", @names) ; foreach my $name ($text=~/(\b(?:[A-Z](?:\.|[a-z]+)\s+)+(?:$names_re))/ +sg){ print $name."\n"; }
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|