[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] PCRE reference with examples
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] PCRE reference with examples
- From: Dan Vande More <bigdan (at) gmail.com>
- Date: Thu, 13 Oct 2005 11:03:22 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QGqVZ/BA37Hqo+kJcGo5fBFACN5LMKquSbNcJMRHCTfOdyaDgezVk136hZ/0+Pob9aFVa+LEmmB+DARDraMusl6eOLyKpVpkvRn1h7bT5wVnW2l7XxSpX81DUqt9ajo5Ph36JHyfaJkVZhTYdTYDc/0Ijbs8nJCIkh37freWYIA=
- References: <434DD106.2070800@wi.rr.com> <20051013054933.GB17991@hswn.dk> <434E8242.4030802@wi.rr.com>
You'll probably be better off with:
HOST=^va.*$
(Note the caret instead of the dollar sign.)
-Dan
On 10/13/05, Rich Smrcina <rsmrcina (at) wi.rr.com> wrote:
> Ok, that's great info. Thanks!
>
> Based on that I'm ending up with an expression like:
>
> HOST=$va[\d\w]*$
>
> To match any host beginning with 'va' that has zero or more alphanumeric
> characters after it. Is there an easier way to write this? If not
> that's fine, I just want to make sure I'm using it correctly.
>
> Another poster (Asif Iqbal) posted the MAIL directives with multiple
> recipients. Does that work like he posted? Can the multiple email
> recipients be put into a macro? Consider the following:
>
> $pg-tom=(tomsemail (at) somewhere.com|tomscell (at) wireless.com)
> HOST=tomshost
> MAIL $pg-tom DURATION=5m COLOR=red
>
> Henrik Stoerner wrote:
> > On Wed, Oct 12, 2005 at 10:14:14PM -0500, Rich Smrcina wrote:
> >
> >>Is there an online reference for PCRE available, including examples?
> >>I'm having difficulty setting up alerts and I clearly need help with PCRE.
> >
> >
> > I did a google on "regular expression tutorial" and came up with this:
> >
> > http://www.regular-expressions.info/tutorial.html
> >
> > It isn't specific to PCRE, but PCRE implements the regex flavor found
> > in Perl, so it should get you going.
> >
> > Also, for trying out your regexes there's the "pcretest" utility which
> > comes with the PCRE library. It lets you input your regex and try it out
> > against selected candidate strings:
> >
> > henrik (at) osiris:~$ pcretest
> > PCRE version 4.5 01-December-2003
> >
> > re> /(www|mail|ns).foo.com/
> > data> ns.foo.com
> > 0: ns.foo.com
> > 1: ns
> > data> print.foo.com
> > No match
> >
> >
> > Note that you must put the regex inside slashes when entering it
> > into pcretest (it supports multi-line regexes - Hobbit doesn't).
> >
> >
> > Henrik
> >
> >
> > To unsubscribe from the hobbit list, send an e-mail to
> > hobbit-unsubscribe (at) hswn.dk
> >
> >
> >
>
> --
> Rich Smrcina
> VM Assist, Inc.
> Main: (262)392-2026
> Cell: (414)491-6001
> Ans Service: (360)715-2467
> rich.smrcina at vmassist.com
>
> Catch the WAVV! http://www.wavv.org
> WAVV 2006 - Chattanooga, TN - April 7-11, 2006
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
>
>
>