Simon icon Simon
Flexible server monitoring

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.