Build, test, and debug regular expressions
This regex matches any period (.) that is not immediately followed by a 3 to 4 character alphanumeric file extension at the end of a string. It utilizes a negative lookahead to safely ignore the final dot in a filename, such as `.txt` or `.jpeg`. It is particularly useful for sanitizing filenames by replacing or removing internal periods without corrupting the file extension.