Wildcards in account filters
I'm sure I am not alone when I say SPAM is out of hand. I keep up with it almost daily creating filters, but they are getting out of hand/ For example I have these (that work):
keto.fat.burn-
keto-fat-burn
keto_fat_burn
Instead of these three, for example, would this work?
keto?fat?burn?
Thanks!
-
Likely should have mentioned I use these as Any Header - Contains - Discard Message. 0 -
Thanks. Appreciate your reply. Does this search headers only or all of the message? And if I understand what you say, then this: keto.fat.burn Would match these: keto_fat_burn- keto-fat-burn- And so I would not need either the trailing- or the *. Or am I misunderstanding? 0 -
Does this search headers only or all of the message?
That depends on what you select for the filter - you'd need to select "Body" "Matches Regex" for this to scan the body of the message.And if I understand what you say, then this: keto.fat.burn Would match these: keto_fat_burn- keto-fat-burn- And so I would not need either the trailing- or the *. Or am I misunderstanding?
He's saying specifically thatketo.fat.burn-*
would match the three terms you listed:keto.fat.burn- keto-fat-burn keto_fat_burn
instead ofketo?fat?burn?
An explanation of the -* is found at regex101-* matches the character - literally (case sensitive) * Quantifier " Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)0 -
Thanks, but forgive me, I still don't know why I need the "*". I am now testing Any Header Matches Regex keto.fat.burn- and seems to be working as I desire. Am I missing something? Will wait to hear before I add bunches more this way. Thanks! 0 -
If it's matching as you need it then go with it but the * should allow it to be matched as many times in the body as necessary. 0 -
Ahhh, OK. Key word "body". I am searching any header. And even if it were the body, the filter is set to delete the message as soon as the string is found. Hence "*" not needed. And this seems to be easier and working better to do the matching regex with "." wildcards rather tha any header "contains" and a separate rule for each possibility of separator. Thanks. 0
Please sign in to leave a comment.
Comments
7 comments