Test, validate and match regular expressions
This regex parses file paths into three capture groups: the directory path (up to the last slash or backslash), the base filename (word characters, hyphens, underscores), and any file extensions including compound ones like .tar.gz. It handles both Unix (/) and Windows (\) path separators. Useful for file processing tools, path validators, and cross-platform applications that need to extract filename components.