Re: Regex help
- From: Jesse Houwing <jesse.houwing@xxxxxxxxxxxxxxxx>
- Date: Sun, 10 Feb 2008 17:58:48 +0000 (UTC)
Hello Epetruk,
Hello,
I'm trying to write a regular expression that extracts the host name
from a string.
In other words, the string I extract must have:
- only letters, numbers and fullstops in it;
- the fullstops most be in the middle of it.
So if I have a string like this:
"this is a host.domain.com name that I want"
what kind of regular expression would I write to extract
'host.domain.name'?
\b(?i:[0-9a-z]+(\.[0-9a-z]+)+)\b
should do the trick.
--
Jesse Houwing
jesse.houwing at sogeti.nl
.
- References:
- Regex help
- From: Epetruk
- Regex help
- Prev by Date: NRE opening combobox dropdown menu
- Next by Date: forcing parent window's title bar to remain active
- Previous by thread: Re: Regex help
- Next by thread: Is SqlServer Express suppose to get installed when VS2008 Pro is installed?
- Index(es):
Relevant Pages
|