Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How do I find and replace every letter in a word with a modified version of the word? Basically I need to find any letter [a-zA-Z] and replace it with [aA][zZ]. For Example:
my $word = "layer" my $new_word = "[l][a][y][e][r]"
2018-07-17 Athanasius added code tags within text
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex find and replace with a twist
by haukex (Archbishop) on Jul 17, 2018 at 05:20 UTC | |
|
Re: regex find and replace with a twist
by dsheroh (Monsignor) on Jul 17, 2018 at 07:26 UTC | |
by AnomalousMonk (Archbishop) on Jul 17, 2018 at 15:29 UTC | |
by Anonymous Monk on Jul 17, 2018 at 07:36 UTC | |
by talexb (Chancellor) on Jul 17, 2018 at 12:41 UTC | |
by haukex (Archbishop) on Jul 17, 2018 at 13:01 UTC | |
by talexb (Chancellor) on Jul 17, 2018 at 13:11 UTC | |
| |
|
Re: regex find and replace with a twist
by james28909 (Deacon) on Jul 17, 2018 at 12:16 UTC |