sandy1028 Posted February 13, 2013 Share Posted February 13, 2013 https://www.abc.com.wi.pr.com/ https://www.abc.com/ https://www.def.com.wi.pr.com/ https://www.wt.com.wi.pr.com/ There are many URL's but we should not match with the string (wt). Hard coding works but there are many names which is not possible, Trying to use the regex something like this but no luck Can you please tell me regex using something like '?!' as below https?://(www.)?(.*)(?!wt).com[^/]*/?$ Quote Link to comment https://forums.phpfreaks.com/topic/274435-match-the-domain/ Share on other sites More sharing options...
trq Posted February 13, 2013 Share Posted February 13, 2013 What? Quote Link to comment https://forums.phpfreaks.com/topic/274435-match-the-domain/#findComment-1412191 Share on other sites More sharing options...
sandy1028 Posted February 13, 2013 Author Share Posted February 13, 2013 Can you please provide the regex which matches all the domains except, "wt.com". I should use as a regular expression. Something like backreferening technique Quote Link to comment https://forums.phpfreaks.com/topic/274435-match-the-domain/#findComment-1412200 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.