Test, validate and match regular expressions
This regular expression extracts a file name without its extension from a Linux file path. It uses a named capture group, `FileNameWithoutExtension`, to capture the base name consisting of word characters. It then optionally matches a file extension and any remaining non-slash characters until the end of the string. This is particularly useful in scripting or log parsing where you need to isolate the core file name from a full directory path.