Thought I’d write about the Regex lazy match here while I still have it in a explainable state in my mind…
For example, consider the string:
With the regex:
The + operator is greedy, and will attempt to match as much text as possible, which would produce a single match group containing [test string] [test string]
To stop this behavior, use the lazy plus: +?
This produces two match groups:Â [test string] [test string]