Course of Raku / Regexes and grammars / Regexes
Anchors
So far a pattern could match anywhere inside a string. An anchor does not match a character at all — instead it asserts a position: the start of the string, the end, or the boundary of a word.
Anchors are what let you say “the string must start with this”, “the whole string must be exactly this”, or “this must be a complete word, not just part of one”.
Topics in this section
Practice
Complete the quizzes that cover the contents of this section.
Exercises
This section contains 3 exercises. Examine all the topics of this section before doing the coding practice.