September 2017
Beginner
402 pages
9h 52m
English
Adverbs are regex modifiers. They are colon-prefix letters that change the behavior of regexes.
Adverbs exist in two forms—short and long—and appear in front of a regex, for example:
say 'OK' if 'ABCD' ~~ m:i/ abcd /;
Notice, that when an adverb is applied to the whole regex as in this example, m or rx is needed. Alternatively, an adverb can be put inside the regex. In this case, it starts its action from the position where it appeared. This is demonstrated in the examples in the next section about the :i adverb.
The following table lists all the adverbs:
| Short form | Long form | Description |
| :i | :ignorecase | Match letters are case-insensitive |
| :s | :sigspace | Whitespacess are significant |
| :p(N) | :pos(N) | Start at ... |
Read now
Unlock full access