Hacker News new | ask | show | jobs
by p1mrx 2342 days ago
> Text representation of IPv4 is easy to detect. IPv6 representation? Good luck with that.

This regex will detect any IPv6 address:

    ([0-9A-Fa-f]*:){2}[0-9A-Fa-f:.]*
Then you can feed matches to a real address parser to filter out false positives.