How do I match a domain name starting from the dot?
# Match something like these
".domain4you.co.uk"
".domain-house.de"
This is what I have:
@domains = ("http://www.domain.com ", "http://www.domain4you.co.uk
"http://www.domain-house.de" "https//rrp.cash-day.com"
);
foreach (@domains){
$_ =~ /^\D ([\.A-Za-z0-9]+[\.\D])$/; # What is wrong here?
# Need ".domain.com", but I get "ww.domain.com"
$x = $1;
print "$x";
}
Babs
- RE: Regex to match domain for cookie B. Fongo
- RE: Regex to match domain for cookie Hanson, Rob
- AW: Regex to match domain for cookie B. Fongo
- What exactly is this simple regex doing? B. Fongo
- Regex to match domain for cookie Babale Fongo
- RE: Regex to match domain for cookie Traeder, Philipp
