Delete hostname from a computer name via REGEX

Asked

Viewed 51 times

-2

NAMESERVER.DOMINIO.COM.BR

From this format above I want to remove the NAMESERVER. via regex

Staying only DOMINIO.COM.BR

What would be the regular expression (REGEX) that varies this?

  • 1

    Depends, what are the rules you want to include in this expression? Do you want to get everything after the first point? The domain can include www. also, so that you have to consider this point?

1 answer

2


^.*?\. use that Regex should solve...
^: to indicate that it is at the beginning of a string
.*: Delete everything...
?\.: Until the first Point.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.