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.

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".

Regards,
Martin Melin

On Thu, Dec 10, 2009 at 4:18 PM, shadih rahman <[email protected]> wrote:

> List,
>    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
>
>
>
> /usr/lib64/nagios/plugins/check_snmp -H hostname -C community -o
> .1.3.6.1.2.1.1.6.0 -r "^*.some string*$"
>
> Could Not Compile Regular Expressioncheck_snmp: Could not parse arguments
>
>
>
>
> --
> Cordially,
> Shadhin Rahman
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
>
> _______________________________________________
> Nagios-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to