Yeah, maybe, but I'm not going to bang my head against this wall until I'm clear what is wanted. This line:kyriakos876 wrote: ↑December 10th, 2018, 1:29 pm I think he wants an IfMatch that works with 2 conditions.
1) If the RegExp returns nothing, disable MeasureB.
2) If the RegExp return Name1 AND Name2, disable MeasureB.
(don't know the syntax tho so I hope you can fill it from here if that's what he wants.)
RegExp=(?siU)(?(?=.*<Item>).*<Name1>(.*)</Name2>)
Looks suspicious... You won't see HTML "tags" that don't match like that. If you open a a tag with <Name1>", you have to close it with "</Name1>".
Now maybe the HTML is something like:
<item><Name1>Bob</Name1> loves </Name2>Sue</Name2></item>
But that is not clear to me, and his regular expression doesn't capture the values of Name1 and Name2 separately so they can be tested as individuals. Perhaps he wants to test for the very existence of the literal strings "<Name1>" and "</Name2>", irregardless of what the value(s) might be, or even if they are defined as an empty string like "<Name1></Name1>", but I'm not willing to go down the rabbit hole without a flashlight.
With the example he gives:
Code: Select all
[MeasureA]
Measure=WebParser
Url=#URL#
RegExp=(?siU)(?(?=.*<Item>).*<Name1>(.*)</Name2>)
IfMatch= |Name1.*Name2
IfMatchAction=[!DisableMeasure "MeasureB"]
I need a clear and unambiguous example of what the user is trying to do. We are being expected to put a lot of thought into the answer, I expect a reasonable amount of thought to be put into the question.