<div dir="ltr">Did you try quoting the entire 'cont;URL;[expected_data]" string?<div><br></div><div>I just tried this:</div><div><br></div><div><div>192.168.1.4   <a href="http://xxxx.yyyy.com" target="_blank">xxxx.yyyy.com</a>        #  "cont;<a href="http://xxxx.yyyy.com/test.html" target="_blank">http://xxxx.yyyy.com/<wbr>test.html</a>;<a href=\x22foo/bar\x22>"</div></div><div><br></div><div>and the page source for the "info" column shows:<br><div><div><br></div><div><tr><th align=left>Content checks:</th><td align=left></div><div><a href="<a href="http://xxxx.yyyy.com/test.html" target="_blank">http://xxxx.yyyy.com/<wbr>test.html</a>"><a href="http://xxxx.yyyy.com/test.html" target="_blank">http://xxxx.yyyy.<wbr>com/test.html</a></a>&nbsp; must return '<a href="foo/bar">'<br></div><div></td></tr></div></div><div><br></div><div>so you can see it picked up the whole  '<a href="foo/bar">' string.  The test.html file on the server contains nothing but the opening and closing html/body tags, and the match string.  If I change "foo" to "fod" in test.html, the match fails and if I change the leading "<" to a comma, the match also fails<br></div></div><div><div><br></div><div>      <a href="http://xxxx.yyyy.com/test.html" target="_blank">http://xxxx.yyyy.com/test.html</a> - Testing URL yields:</div><div><br></div><div>      ,a href="foo/bar"><br></div></div><div><br></div><div>Ralph Mitchell</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 4, 2017 at 4:55 PM, John Thurston <span dir="ltr"><<a href="mailto:john.thurston@alaska.gov" target="_blank">john.thurston@alaska.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm fighting with the correct escaping and encoding for http content checks using the "cont=" tag:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
cont[=COLUMN];URL;[expected_da<wbr>ta_regexp|#digesttype:digest]<br>
  This tag is used to specify a http/https check, where it is also<br>
  checked that specific content is present in the server response.<br>
</blockquote>
. . .<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  The regex is pre-processed for backslash "\" escape sequences.  . .<br>
</blockquote>
<br>
I can't find the expression to match the string:<br>
   <a href="foo/bar"><br>
(Which I hope your email client isn't going to try to render as html!)<br>
<br>
The closest I can manage is:<br>
  a\x20href=\x22foo/bar\x22><br>
<br>
Where \x20 is an ASCII space, and \x22 is a double-quote<br>
<br>
If I put a leading \x3D (which is an equal-sign), that renders in the search string and obviously doesn't match my supplied content. If, however, I put a leading \x3C (which is the less-than sign) the rest of the expression is eaten and is not rendered. I've tried leading the \x3C with \x5C (which is a backslash), with no effect.<br>
<br>
I also tried leading with \x5C\x78\x33\x43 (which is \x3C), which renders as such, but does not match my string.<br>
<br>
The upshot is, I can match enough of my string to be unique on my page. But it seems like something isn't right in the regex escaping and cleansing for this test. The supplied string should be accepted as a string, but the "<" seems to be interpreted during the parsing instead.<br>
<br>
Can anyone else find a way to use a "<" in the regex of the cont= test?<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
   Do things because you should, not just because you can.<br>
<br>
John Thurston    <a href="tel:907-465-8591" value="+19074658591" target="_blank">907-465-8591</a><br>
<a href="mailto:John.Thurston@alaska.gov" target="_blank">John.Thurston@alaska.gov</a><br>
Department of Administration<br>
State of Alaska<br>
______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman<wbr>/listinfo/xymon</a><br>
</font></span></blockquote></div><br></div>