Anchors such as ^, $, and the \b boundary character are zero-length assertions that filter matches based on special conditions. These conditions restrict the position of the first or last character of the match. We will now do something similar, but this time, we will restrict the position of some characters in the expression with respect to other characters in the string. Lookahead and Lookbehind are two zero-length assertions that accomplish this.
For the sake of simplicity, we will restrict this chapter to PCRE-compatible languages and Perl 6.
Lookahead
A lookahead matches characters but reverts ...