Test, validate and match regular expressions
Matches file paths containing a node_modules directory, capturing any preceding path segment (group 1) and any nested subdirectories/files inside it (group 2). With multiline and global flags, it works across multiple path lines, handling optional leading paths and trailing slashes. Useful for filtering or excluding Node.js dependency paths in build tools, linters, or file watchers.