Simulating Negative Lookaheads in non-PCRE Engines
Negative lookaheads (and lookaround constructs in general) are an awesome feature in PCRE. For example, to match all instances of abc, but only those that are NOT followed by def, you can use the following regex: abc(?!def) However, some modern regex engines do not support lookaround constructs due to performance concerns. This is the case for the default regex engines in Go and Rust (for example, GitHub uses Rust, and so do its search features)....