I need help building a regular expression that can properly match an URL inside free text.
- scheme
- One of the following: ftp, http, https (is ftps a protocol?)
- optional user (and optional pass)
- host (with support for IDNs)
- support for www and sub-domain(s) (with support for IDNs)
- basic filtering of TLDs (\[code\][a-zA-Z]{2,6}\[/code\] is enough I think)
- optional port number
- path (optional, with support for Unicode chars)
- query (optional, with support for Unicode chars)
- fragment (optional, with support for Unicode chars)