I’m having trouble finding a regular expression that works with my domain name. I do not know if I have a special domain name, but none of the examples I’ve found are working for me.
Here is my host name:
81-232197-178.cust.bluewin.ch
and here is my regex:
^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$
but it doesn’t match.
If you are screen-scraping that website, you’re probably better looking for the adjacent text and taking the string out of the next element in the DOM, rather than trying to find a regular expression that matches just that text in the page.