in reply to Text markup confusion
givesmy $text = "I saw the panda myself,\nbut Amy did not.\nA var a.my"; my $regexp = qr/(a[ .]*my)/i; $text =~ s/$regexp/'~'.uc $1.'~'/ge; print "$text\n";
Here, I have tested for optional spaces and periods. Generalization to other punctuation is straightforward.I saw the pand~A MY~self, but ~AMY~ did not. A var ~A.MY~
-Mark
|
|---|