Clarity requried ...http retreiver - binary - pick up 0 if element not found on page and 1 if it is
Given that regex is very poor at stating something was not found what would be the best way of testing a web page with the following
if "ABC" found on page then return 1 else return 0
Hmm, there is a roundabout way, although it's not entirely clean...
If you leave the "ignore if missing" checkbox unchecked, you will get an event raised if the specified group is empty. You can then use this event to set the value of another point (say, a virtual point with "no change"), and go from there. I haven't tested this myself, but in theory it should be ok.
finally worked this out
HTTP page reads "This is a document"
use HTTP retreiver and point type binary
Regex : ".*(is.?) *"
do not use inverted commers (done for clarity here) and note space after the closing bracket ) which captures the space before the "a"
This regex returns TRUE
change regex to
".*(ix.?) *" (again note space a do not use inverted commas)
if you need any help drop me a PM
Having tried more combinations it is now apparrent that my previous email is not always true
Serotonin - can we have some clarity on how this is supposed to work specifically
1 - the test button - does this work exactly the same as when the product is running live (i.e. does it take account of the Binary 0 value)
2 - when it says "No value match made for point " could the message be clearer as to what the problem is as this error is returned for multiple errors I think
3 - what would be the quickest way of constructing a test harness to test out regex as implemented by Mango as getting regex working is a big pain
1 - Yes
2 - When Matcher.match returns false, that message is shown. Can you enumerate the multiple errors you think this is returned for?
3 - Personally, i use QuickREx, a plugin for Eclipse by Bastian Bergerhoff, and i recommend it. If you're not using Eclipse there are probably similar tools around. Find a Java-based one to be sure you're using the same pattern compiler/matcher as Mango.