Build, test, and debug regular expressions
This regex matches the literal string 'bar' only when it is immediately followed by another 'bar', using a positive lookahead that asserts the following text without consuming it. For example, it matches the first 'bar' in 'barbar' but not a standalone 'bar'. Since the lookahead is zero-width, the match itself is only 3 characters, leaving the second 'bar' available for subsequent matches. It's commonly used for context assertions and enabling overlapping matches.