Positive Lookahead: Peeking Ahead
Lookaheads are zero-width assertions. They peek forward, check for a match, and then return to the position where they started. The syntax is (?=...).
Learning Objectives
Lesson Outline
Lookaheads are zero-width assertions. They peek forward, check for a match, and then return to the position where they started. The syntax is (?=...).
Notice that the match is only "Windows", not "Windows 11". The lookahead checks but doesn't consume.