Test, validate and match regular expressions
This regular expression matches any line ending with the .ts extension. It utilizes the global (g) and multiline (m) flags to scan through an entire text block and evaluate each line individually. The lookbehind assertion (?<=[\S\s]) asserts that the position at the end of the line is preceded by at least one character, which in this context guarantees the match includes the 's' of the .ts extension. It is ideal for finding TypeScript or MPEG-2 Transport Stream file references in logs or scripts.