Test, validate and match regular expressions
This regex captures the base filename without its extension. It uses a lazy quantifier to match everything before the last period (which marks the beginning of the extension), storing this in the first capture group. The pattern is useful for file processing tasks where you need to extract or manipulate filenames independently of their extensions.