Build, test, and debug regular expressions
Matches a text span containing both 'longword1' and 'longword2' in either order on a single line. The first alternative catches adjacent occurrences, while the other two use \K to reset the match start and subroutine calls (?1)/(?2) to reuse the capture groups, reporting the stretch from one word to the other regardless of sequence. Useful for filtering log lines or records that must contain both keywords.