in reply to Re: Regex matching on anywhere but the beginning or end of a line
in thread Regex matching on anywhere but the beginning or end of a line

Ehm, I benchmarked the code I gave on the example data he gave ofcourse..
my $t = q["string (12" or 1 foot or 1') into 6" MySQL varchar"]; $t =~ s/(?<=.)"(?=.)/""/g;
versus
my $t = q["string (12" or 1 foot or 1') into 6" MySQL varchar"]; substr($t, 1, -1) =~ s/"/""/g;
And the number of iterations is shown in the benchmark output (2**20 = 1048576)