cancel
Showing results for 
Search instead for 
Did you mean: 
Post a Question

Regex for TLD Blocks

I've been working for a little while to get a regex crafted that works to block identified Top Level Domains via the App/URL blade and so wanted to share my results.  This could also easily be modified via a NOT and optional list of domains that you want to allow instead of domains you want to block.  

Just replace TLD with a domain you want to match.

^[^:\/]+:\/?\/?[^\/]+\.TLD\/

Tags (3)
0 Kudos
1 Reply
Highlighted

Re: Regex for TLD Blocks

So far I have found this to be more effective. 

(?:[a-zA-Z]*\.)+(TLD)[/|\s]

0 Kudos