Test, validate and match regular expressions
This regex matches text segments that either precede HTML/XML tags (enclosed in angle brackets) or extend to the end of the string. It captures non-greedy text sequences followed by either a tag pattern or end of string. Useful for tokenizing strings that contain markup, extracting plain text between tags, or parsing simple XML-like content.