Test, validate and match regular expressions
Validates URLs with an optional scheme (http, https, ftp, sftp, or file), optional username:password credentials (using Unicode non-control characters), a hostname, an optional port (up to 5 digits), and an optional path with fragment. Useful for form validation and URL parsing in web applications. The g and m flags allow finding multiple URLs across lines of input.