More Regular Expressions: Using Lookarounds to Parse Data
While using regular expressions, lookarounds allow us to create zero-width boundaries where the boundaries are also regular expressions. This will enable us to ensure that our primary expression either begins or ends with the provided lookaround or does not begin or end with the provided lookaround. The expression in the lookaround is matched, but not captured, so the resulting match is only the non-lookaround text. This allows us to fine-tune our expressions and ensure we're only matching what we want.