Build, test, and debug regular expressions
This regex matches an optional file extension at the end of a line, consisting of a dot followed by any characters except another dot. The multiline flag makes it operate on each line, and the global flag finds all matches. It is useful for extracting, changing, or removing the final extension in filenames, such as converting 'file.txt' to 'file.md' or stripping '.gz' from 'archive.tar.gz'. The group being optional also allows matching lines with no extension.