Community discussions

MUM Europe 2020
 
ulink
Member Candidate
Member Candidate
Topic Author
Posts: 128
Joined: Fri Mar 05, 2010 5:07 am

Layer 7 regex to match domain list

Sun Jan 05, 2014 11:42 pm

Came across the following regular expression at this website:
http://www.mkyong.com/regular-expressio ... n-example/
Expression:
^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$

As his post demonstrates, the expression identifies valid domains based on the structure of the domain.
I would like to identify a way to use this expression (or a modification of it) to match a list of domains I manually populate.

Hoping the forum can point me in the right direction on how to make a list of domain names that, when passed by the regex expression, are marked for further processing.

Thanks
 
deejayq
Member Candidate
Member Candidate
Posts: 195
Joined: Wed Feb 23, 2011 8:33 am

Re: Layer 7 regex to match domain list

Mon Jan 06, 2014 8:37 am

i use something like this in allowing dns requests
/ip firewall layer7-protocol
add name="wireless allow" regexp=facebook.com|fbcdn.net|akamaihd.net|youtube.com|ytimg.com|yahoo.com|yimg.com|google.

Who is online

Users browsing this forum: No registered users and 57 guests