Help with removing anything even remotely related to a particular judgment sub
Hi there,
We have a filter to remove a good majority of AITA related questions and comments, but since I suck with regex, posts squeak past it routinely.
Current:
body+title (includes-word, regex): ["aita", "wibta", "(would i be|am i|i'm)[ ](the|an|a)[ ](asshole|ahole|ass)", "r/aita", "r/amitheasshole"]
This catches "am i the asshole" "would I be the asshole if", "my partner says i'm an asshole" etc, but it doesn't catch "am I a huge asshole if". I could just add "asshole" in by itself, but I would like to actually learn something here and keep it clean.
Additionally, how would I filter a comment that STARTS with "info"? We remove any of the standard AITA terms, but I'd also like to remove a comment if it starts with "info" as that's generally a fishing expedition to pass judgment, and, well, we're not a judgment sub.
Help please?
Posted Aug 1, 2021, 7:39 PM UTC
15
Ok, note that brackets don't make their content optional unless followed by a ?, and if you only have one character inside them you can remove the brackets :) (they are a way to make each character inside them possible)
Also ' only matches that specific apostrophe so you can use brackets with different ones
Oooh, thank you so much!
Can I include
in a rule with
or does it need to be a separate rule? I would probably make it a separate rule regardless, because I would want a very specific removal reason to go with it, but if I wanted to merge them together, could I do so? I don't see reference to an OR operator in the documentation for that, so I am assuming two rules, but wanted to confirm.
Yeah you would need 2 rules if you want one rule to act on posts and one to act on comments based on different keywords
But otherwise if you only want to check that one of the keywords is at the start then you can do it with ^ in regex like:
Thank you for your help, it's very appreciated!
No problem :)