Test, validate and match regular expressions
This regular expression matches one or more word characters, dots, underscores, or hyphens at the end of a line. Using the global and multiline flags, it is designed to extract or validate filenames with extensions from a multiline string. It effectively captures typical file naming conventions, ensuring the string ends with valid filename characters.