Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Home
Latest images
Search
Search Query
Display results as :
Posts
Topics
Advanced Search
Register
Log in
Easy A
::
Useless
::
Trash
Share
regex: disallow some domain names, allow others
Author
Message
Chuubby
Member
Posts
:
9
Join date
:
2011-05-20
Subject: regex: disallow some domain names, allow others
Wed Jun 29, 2011 6:35 am
regex: disallow some domain names, allow others
For example there are URLs
http://www.subdomain1.domain.com.uk
and
http://www.subdomain2.domain.uk,
from these URLs I need to extract only the name subdomain1 and subdomain2 accordingly.
But if I receive
http://www.subdomain3.co.uk
or
http://www.subdomain4.com
I need to get the whole URL like subdomain3.co.uk and subdomain4.com.
My expression catches whole URL: ^http:\/\/(?:www\.)?((?!SubdomainToNegate|www)[^\.]*\.(?!domain\.com\.uk|domain\.uk).*)$
My situation is shown better over there:
http://www.rubular.com/r/qAdMdJoNYb
regex: disallow some domain names, allow others
Page
1
of
1
Similar topics
Similar topics
»
all of our domain names
»
regex check please.
»
Finally we got a domain name!
»
i want to change domain name that i order
Permissions in this forum:
You
cannot
reply to topics in this forum
Easy A
::
Useless
::
Trash
Easy A
::
Useless
::
Trash