Positive Look-Ahead patterns are look-around patterns that match only if the text immediately to the right of the match also matches the test-pattern. As with all look-around patterns, the "test pattern" is not part of the match.
This can be better explained with an example. Using our buffer containing a variety of dates:
suppose we want to match all years for which the month is in Q4 (months 10, 11, and 12). The first step is to create the pattern that matches our desired content, the year portion of the date:
\(\d\d\d\d\)
Now that we have defined the main pattern, the next step is to define the test pattern. We only want to match the year when the month starts with a "1", so we can use the test pattern:
\(-1\)
Finally, to mark the test as a positive look-ahead assertion we use \@= to get the final pattern:
\(\d\d\d\d\)\(-1d\)\@=
when we execute this pattern:
Note that although our main pattern will match any year, only those years for which the month also matched the test pattern are highlighted.