Test, validate and match regular expressions
Matches everything up to and including the last forward slash in a path string. With the global flag, it can be used to strip directory components from absolute paths, effectively isolating filenames. Commonly applied in file path manipulation to extract just the filename from a full path.