Test, validate and match regular expressions
This .NET-specific regex leverages a variable-length lookbehind to extract filenames with extensions from URLs, including those containing ANSI escaped characters like `%2F` for slashes. It effectively isolates the filename by checking that it is preceded by a valid path separator and followed by a query string delimiter or the end of the line. This pattern is ideal for parsing complex web addresses, extracting document links, or analyzing web server logs.