Simon icon Simon
Flexible server monitoring

Introducing Simon 5!

Simon version 5 is now available. It is a massive update, introducing a much-requested feature: syncing the Simon data between multiple Macs, plus a Simon Status service, a Link Checker filter, improved Find filter, iMessage and Speak Error notifiers, a new app icon, and much more.

Important: please note that Simon 5 requires a minimum of macOS 10.12 (Sierra), and is a paid upgrade from Simon 4. Purchasers since September 1, 2020 automatically get a version 5 license (that also works in previous versions).

Read the Simon What's New page for details.

Filter HTML page using multiple OR statements


I am trying to filter a SUCCESS when I have found a combination of different items.
So this is not an AND statement where all scenarios need to be true but and OR statement where only 1 of these statements need to be true.

I created multiple success filters but this did not seem to work as the logic seems to use AND logic.
I also separated them with a , in a single filter and also got the same AND result.

How would I write a filter that would report a success if it found any of these statements in the web page?

No Records Found
Showing 4 Records of 4 Found
Showing 3 Records of 3 Found
Showing 2 Records of 2 Found
Showing 1 Records of 1 Found

David Sinclair's picture

Re: Filter HTML page using multiple OR statements

There are a few ways you could do this, e.g. a series of filters where the alternatives are evaluated if a failure occurs, or a custom script, but perhaps the easiest option would be to use a regular expression.

I suggest using the Find Regular Expression filter, and enter the options like so:

(No Records Found|Showing [1-4]+ Records of [1-4]+ Found)

I haven't tried this, so it might not be quite right, but hopefully helps.

ucnrsinfomgr's picture

Re: Filter HTML page using multiple OR statements

When I changed it from text match to regular expression
And then entered your suggested text
It worked.

Thank you so much for your advice.