$_iu S I have added simple network ranges validation, the rules I used are: - valid range 188.8.131.52 - 184.108.40.206, network adresses above and including 220.127.116.11 are reserved addresses - first and last IP address of each class is excluded since they are used as network broadcast addresses since I don't think this is worth implementing completely in a regular expression, a following pass should exclude the Intranet address space: 10.0.0.0 - 10.255.255.255 172.16.0.0 - 1.255 192.168.0.0 - 192.168.255.255 the loopback and the automatic configuration address space: 127.0.0.0 - 127.255.255.255 169.254.0.0 - 169.254.255.255 while the local, multicast and and the reserved address spaces: 0.0.0.0 - 0.255.255.255 (SPECIAL-IPV4-LOCAL-ID-IANA-RESERVED) 18.104.22.168 - 239.255.255 (MCAST-NET) 240.0.0.0 - 255.255.255.255 (SPECIAL-IPV4-FUTURE-USE-IANA-RESERVED) should already be excluded by the above regular expression. This has been written to validate URLs typed by users and/or found in log files. :\x22|\x5b\x2f|\x3c\x2f) haven't tried it, not sure it does exactly what you asked/depicted. I'd like to let through URL's without the protocol specified (HTTP(S) or FTP). @nghuuphuoc, the regexp already supports international URLs, just write them using natural UTF-8 encoding. Negative lookahead is used instead NOTE, that package does fuzzy search, not strict validation. If they copy it out and back into a browser so they may not know what's wrong with it upon visual inspection.
In that network, 22.214.171.124 and 126.96.36.199 are two valid and usable address. " (string contains double quotes) ' (string contains single quote) [ (string contains brackets) here is JS demo with full unicode support, including astral characters. Src is here: https://github.com/markdown-it/linkify-it/blob/master/lib/. Since astral characters take 2 positions, [^negative] class is impossible. some=query while they may not technically be valid, it is something I could see a user typing and most browsers will fix it for them. The only pattern it won't match for me (Using it in a Java Regex) is where the IP address is '0'(ZERO) padded, like: I get as input from other tools. Public Sub Match Url(url As String) Dim rxs As String = "" 'protocol identifier rxs = rxs "(?