Build, test, and debug regular expressions
This regex splits a Windows file path into two capturing groups: the directory path (including the trailing backslash) and the file name with extension. It uses a possessive quantifier and a lookbehind to efficiently find the last backslash. This is highly useful for extracting filenames or directory structures from absolute or relative paths.