Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

ipv6 hyperlink regex missing #194

Open
Reiner030 opened this issue May 23, 2015 · 1 comment
Open

ipv6 hyperlink regex missing #194

Reiner030 opened this issue May 23, 2015 · 1 comment

Comments

@Reiner030
Copy link

would be nice if it can be added to actual 0.64 version:

This regex looks nice:
http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses

([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])
  • I tried to use it in version 0.63-t022 but it was rejected because of "too many ()" ...
    Perhaps that can be fixed ?
  • I tried to use regex {2,7} which is also needed for above regex part...
    But this seems not supported ?
@FauxFaux
Copy link
Owner

The regex library in use is horrendously old, and has a number of bugs and limitations. I've been meaning to update it for a while (#4 (look how low that is!)) but I've given up before; the newer version was too incompatible with what PuTTYTray was using. Perhaps switching to a different regex library that uses more modern regex syntax would be an option.

I mean, how hard could it be...

For the v6 regex, I may have a go at porting it to something AwfulRegex (as the current implementation shall now be known) will accept, or maybe someone else can have a go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants