I have a list of search terms and I would like to have a regex that matches all items that have at least two of them.
Terms: war|army|fighting|rebels|clashes
Match: The war between the rebels and the army resulted in several clashes this week. (4 hits)
Non-Match: In the war on terror, the obama administration wants to increase the number of drone strikes. (only 1 hit)
Background: I use tiny-tiny rss to collect and filter a large number of feeds for a news reporting project. I get 1000 - 2000 feed items per day and would like to filter them by keywords. By just using |OR expression, I get to many false positives, so I figured I could just ask for two matches in a feed item.
Thanks!
EDIT:
I know very little about regex, so I stuck with using the simple |OR operator so far. I tried putting the search terms in parenthesis (war|fighting|etc){2,}, but that only matches if an item uses the same word twice.
EDIT2: sorry for the confusion, I'm new to regex and the like. Fact is: the regex queries a mysql database. It is entered in the tt-rss backend as a filter, which allows only one line (although theoretically unlimited number of characters). The filter is employed upon importing of the feed item into the mysql database.