Build, test, and debug regular expressions
This regex matches filenames that may contain a version number in parentheses followed by an optional file extension. It captures three groups: the base filename, the optional version number (without the parentheses), and the file extension (including the dot). Useful for parsing filenames with versioning like 'document(2).txt' or 'archive.pdf'.