Test, validate and match regular expressions
Validates absolute file paths starting with either a Windows drive letter (e.g., C:) or a Unix-style leading forward slash. Directory segments may contain letters, digits, underscores, hyphens, spaces, and dots (case-insensitive), and the path must end with a whitelisted extension: txt, gif, pdf, doc, docx, xls, xlsx, or js. Commonly used for validating file upload inputs or document path fields in web forms. Note it only accepts forward slashes, so backslash Windows paths will not match.