Course of Raku / Regexes and grammars / Regexes / Adverbs / Exercises / Case-blind match
Solution: Case-blind match
Here is a possible solution to the task.
Code
say 'Hello WORLD' ~~ /:i world/;🦋 You can find the source code in the file case-blind.raku.
Output
「WORLD」Comments
The
:iadverb makes the match ignore the difference between upper- and lower-case letters.The lower-case pattern therefore matches the upper-case
WORLD.