Using Regular Expressions Metacharacters with .net – Lookahead and Lookbehind Zero-Width Assertions
Perl 5 introduced two very powerful constructs: "lookahead" and "lookbehind". Collectively, these are called "lookaround". They are zero-width just like other "zero-width assertions" don’t match actual text, but rather positions in the text. The difference is that lookarounds will actually match characters, but then give up the match and only return the result: match or no match. That is why they are called "assertions". They do not consume characters in the string, but only assert whether a match is possible or not. Lookarounds allow you to create regular expressions that are impossible to create without them, or that would get very longwinded without them.




