[SOLVED] RegEx Add Scores for TLD's doesn't contain specified domain's extensions

Feb 8, 2022
6
0
6
38
Hello,

I search to write "Who" rules for add scores when a domain doesn't finish with .com or .net (per example.)
In documentation, I see regex patern for match expressions, eg for *.com :

*@*\.com

How i can combine two or more values in one expression please?
And it's possible to inverse the logic, "all domains doesn't contain regular expression *.com and *.net...." ?

Thanks in advice,
Best Regards
Philippe
 
How i can combine two or more values in one expression please?
You can use parentheses and the pipe symbol | to combine different possibilities.

For example to accept anything that ends with .com or .net you could use: .*\.(com|net)

I'd suggest checking out a regex tutorial, for example: https://www.regular-expressions.info/tutorial.html

And it's possible to inverse the logic, "all domains doesn't contain regular expression *.com and *.net...." ?
Not for the matching itself, but you can just reverse the actions, for example add a high priority rule for accepting .com/.net and a slightly lower priority rule to block anything.
 
Last edited: