Test, validate and match regular expressions
This regular expression matches a complete string representing a filename composed entirely of one or more alphanumeric characters, followed by a period and a specific file extension. The allowed extensions are JPG, PNG, GIF, BMP, and PDF. It is particularly useful for validating file upload forms or extracting specific file types from text. The filename and the extension are captured into two separate groups for easy extraction.