Why do you want to do it with regexp? Of course it could be done, but it
is not such an easy regexp so I would not do it that way.
I already pointed you to the IPAddress.TryParse() Function. This has the
big advantage, that even IPv6 is supported.
(Just reading the code makes a big difference. A TryParse call is easy
to understand but try to really understand the reg-exp!)
So I would say that this is a much better solution than a regexp.
With kind regards,
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.