Layer 7 regex to match domain list

Came across the following regular expression at this website:
http://www.mkyong.com/regular-expressions/domain-name-regular-expression-example/
Expression:
[1]+(\.[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


  1. A-Za-z0-9- ↩︎

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.