Test, validate and match regular expressions
Matches any string and splits it into components: an optional leading greedy segment, then a lazily captured main part, followed by an optional file extension (a dot plus trailing non-dot characters) anchored at the end. Designed for path/filename parsing, it extracts the base name and extension separately while also gracefully handling empty strings or paths without extensions.