[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cont regex



First off, thanks for coding this amazing piece of software, Henrik.

I'm trying to do a http content check of my Netgear print server's web
interface. The print server has two ports, and I'd like to have two
separate columns that show the status of the two printer ports. I've
tried to come up with some regular expressions, but they haven't
worked so far.

Here's a snippet of the HTML:
--------- HTML START ----------
<table width="530" height="230" border="0" cellpadding="0"
cellspacing=0 bgcolor="#ffbe39">
<div class="maintab">
<tr>

 <td>&nbsp;</TD>
 <th nowrap align="left">Parallel Port 1<p></th>
 <th nowrap align="left">Parallel Port 2<p></th>
</tr>

 <tr><td nowrap>&nbsp;&nbsp;&nbsp;&nbsp;Port Name</td>
 <td nowrap>P1</td>
 <td nowrap>P2</td>

 </tr>
 <tr><td nowrap>&nbsp;&nbsp;&nbsp;&nbsp;Status</td>
 <td nowrap>On-Line</td>
 <td nowrap>Offline</td>

 </tr>
 <tr><td nowrap>&nbsp;&nbsp;&nbsp;&nbsp;Print State</td>

 <td nowrap>Idle</td>
 <td nowrap>Idle</td>
--------- HTML END ----------

I'd like the column color to change if the status of the corresponding
printer port does not match the string "On-Line".
In this case, I'd prefer if the columns went clear instead of red.
I've tried prefixing "cont" with a question mark, but this doesn't
work. I'm running 4.2.0. Why is that?

I'm hoping you can help me create a regex that will do what I've described.