in reply to regex to match URLs
Regexp::Common::URI should do the trick.
Caveats:
It only validate absolute URIs. (I think. But that's probably what you want anyway.)
If you want to validate URIs of a specific scheme, it has to be one of: fax, file, FTP, gopher, HTTP, news, NTTP, pop, prospero, tel, telnet, tv and WAIS.
If you want to validate URIs of any scheme, it will fail if the URI is not of one of the following schemes: fax, file, FTP, gopher, HTTP, news, NTTP, pop, prospero, tel, telnet, tv and WAIS.
|
|---|