Hi all regex newbie here.,
I am trying to write a regular expression that validates IPv6 addresses. I have not added a part of the port yet, I want to process part of the address first.
This is what I still have:
\\[?(?:[:0-9A-Fa-f]+)\\]?
This makes the optional opening and closing brackets. But, as you see, they are independent. Is there a way with regular expressions to require both opening and closing brackets or not?
source
share