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

Re: [Sheflug] Regular Expressions (was Re: Redirecting to a index page depending on group membership on Apache 1.3)



And Lo! The Great Prophet " Barrie Bremner" uttered these words of wisdom:
>
> perldoc perlre.
>

Indeed, but I don't really use perl that much, about once every six months
or so :)


> Aren't most of the regex syntaxes for GNU and/or UNIX tools pretty
> similar?

Pretty much. grep is where it all started, but it was extended by egrep
(which uses ERE's). They all share the core characteristics: ^, $, ., *,
[...], +, < ... > (I think that's it) but egrep added | and {m,n} amongst
others (need to check docs).

>From what little I've seen of PRE's, they're ERE's with extra bits to make
patterns simpler, as in "\d" to match "[0-9]".

I don't think GNU have done anything to extend basic RE's, so they should
always be portable.

Chris...

-- 
\ Chris Johnson                 \
 \ cej [at] nightwolf.org.uk          \
  \ http://cej.nightwolf.org.uk/  ~-----------------------------------+
   \ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.