Jump to content

Match the domain


sandy1028

Recommended Posts

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[^/]*/?$

Link to comment
https://forums.phpfreaks.com/topic/274435-match-the-domain/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.