It looks like you're trying to match "some string", no matter where it appears in the document. In that case, anchoring to line beginning and end is just extra work. Simply match on "some string", and you're good to go.<br>
<br>The asterisk is a modifier to the dot, so it needs to come after that. So the regex you pasted should probably be "^.*some string.*$", but this is functionally equivalent to "some string".<br><br>Regards,<br>
Martin Melin<br><br><div class="gmail_quote">On Thu, Dec 10, 2009 at 4:18 PM, shadih rahman <span dir="ltr"><<a href="mailto:shadhin71@gmail.com">shadhin71@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
List,<br> I am trying to use check_snmp plugin with the following regular expression and I am getting an error, can someone point out what am I doing wrong. Thanks<br><br><br><br clear="all">/usr/lib64/nagios/plugins/check_snmp -H hostname -C community -o .1.3.6.1.2.1.1.6.0 -r "^*.some string*$"<br>
<br>Could Not Compile Regular Expressioncheck_snmp: Could not parse arguments<br><font color="#888888"><br><br><br><br>-- <br>Cordially,<br>Shadhin Rahman<br>
</font><br>------------------------------------------------------------------------------<br>
Return on Information:<br>
Google Enterprise Search pays you back<br>
Get the facts.<br>
<a href="http://p.sf.net/sfu/google-dev2dev" target="_blank">http://p.sf.net/sfu/google-dev2dev</a><br>
<br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>