Course of Raku / Regexes and grammars / Regexes / Matching strings / Exercises / Did it match?
Solution: Did it match?
Here is a possible solution to the task.
Code
say so 'Hello, World' ~~ /World/;🦋 You can find the source code in the file did-it-match.raku.
Output
TrueComments
- A successful match is a true value, but it prints as a match object.
The
sofunction turns it into a plainTrueorFalse.