RosettaCodeData/Task/Regular-expressions/Perl/regular-expressions-5.pl
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

7 lines
362 B
Raku

# add the following just after the last / for additional control
# g = globally (match as many as possible)
# i = case-insensitive
# s = treat all of $string as a single line (in case you have line breaks in the content)
# m = multi-line (the expression is run on each line individually)
$string =~ s/i/u/ig; # would change "I am a string" into "u am a strung"