in reply to Re: Irregular Expression??in thread Irregular Expression??
This time I have to tell you, you're wrong - sorry.
#!/usr/bin/perl use strict; use warnings; my $str = "A'Bcd"; $_ = $str; s/(')/\Q$1$1/g; print "$_\n"; $_ = $str; s/'/\Q''/g; print "$_\n"; $_ = $str; s/(')/quotemeta "$1$1"/eg; print "$_\n"; __END__ A\'\'Bcd A\'\'Bcd A\'\'Bcd [download]
Abigail