Raku provides a superset of Perl features with respect to regexes, folding them into a larger framework called "rules" which provide the capabilities of context-sensitive parsing formalisms (such as the syntactic predicates of parsing expression grammars and ANTLR), as well as acting as a closure with respect to their lexical scope. Rules are introduced with the codice_18 keyword which has a usage quite similar to subroutine definition. Anonymous rules can also be introduced with the codice_19 (or codice_20) keyword, or they can simply be used inline as regexps were in Perl via the codice_21 (matching) or codice_22 (substitute) operators.