Test, validate and match regular expressions
Captures one or more consecutive word characters (letters, digits, underscore) or literal dots into a single group. Because dots are included, it effectively matches path segments or filenames with extensions like 'my.folder.name'. It is commonly used to grab the first directory or file component of a path, stopping at a slash or any other non-word delimiter. Useful for simple path parsing, filename extraction, and capturing identifiers that may contain dots.