Are regex-based "matches" email filters case-insensitive by default?
I know that "contains" cPanel email filters are case-insensitive, but I can't find any documentation as to whether or not "matches" email filters (i.e., regex matches) are also case-insensitive by default.
For example, if I want to match both "This.Is.Text" and "this.is.text" in an email message subject with a single "matches" regex, is the following regex sufficient?
this\.is\.text
Or for case-insensitivity in cPanel email filter regex matching, would I have to use the following regex? ...
(?i)this\.is\.text
In other words, does cPanel automatically prepend (?i) to all specified "matches" regexes, or do we users need to explicitly enter (?i) if we want case-insensitivity for these regex matches?
Thank you in advance.
-
Hey there! The filter system is *not* case sensitive so you don't need to duplicated your rules to match cases.
If you see behavior to the contrary, let me know!
0 -
OK, thank you!
I'll remove all my explicit (?i) prefixes to all my regexes and I'll retest over the next couple days. If I notice any case sensitivity, I'll report back here.
If I don't report back, then it indeed works as you described, and so "no news is good news".0
Please sign in to leave a comment.
Comments
2 comments