Test, validate and match regular expressions
This JavaScript regular expression uses the global flag (`g`) to find all occurrences of a substring that starts with "Bon", ends with "r", and captures the text in between. By using a lazy quantifier (`+?`), it ensures that the capturing group matches as few characters as possible until the first "r" is encountered. This pattern is particularly useful for extracting the shortest possible text segments bounded by specific prefixes and suffixes.