[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cont regex
- To: hobbit (at) hswn.dk
- Subject: cont regex
- From: "M. Hansen" <mh31337 (at) gmail.com>
- Date: Wed, 18 Nov 2009 22:48:05 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=hNAT3CwAVSTaXXmvbN+6/TMh81h+mMb+VwV/tl4mook=; b=mE3xIiak1AzdvPj1RS6pqjNUOPJ3hUjTaLPcgjhmS0yBLExgmPR4bYLBflhm0THY9s VrYbyw2K6YxqKnzfKowz+o9+ApQOJXJVBVFFltTQDQ18kP2iWANOAWjg98l2R8DkjyfE cA4kfJyiMFvn9XtdW7pfytMXCjxjxRFskILmA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=T6Ig8N1Jr4QXEMoM0va9BHkWJLYlVovE3opbWHTgp+ho0yDeKDtuQKlT4OEd12Mbo7 Zkq5K5Wnxp5cWpbLXpEeSwFWjVKSl00xUY0fqu4ESR792DuNUIs5cvGHPMtHDSIjWLi6 n/PHFAqk+1fMTn3Zzev9ZcTSh3QYSm82lwLoo=
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> </TD>
<th nowrap align="left">Parallel Port 1<p></th>
<th nowrap align="left">Parallel Port 2<p></th>
</tr>
<tr><td nowrap> Port Name</td>
<td nowrap>P1</td>
<td nowrap>P2</td>
</tr>
<tr><td nowrap> Status</td>
<td nowrap>On-Line</td>
<td nowrap>Offline</td>
</tr>
<tr><td nowrap> 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.