[BusyBox] expr: use POSIX regex [PATCH]

Rob Landley rob at landley.net
Mon May 9 19:50:39 UTC 2005


On Tuesday 05 April 2005 07:14 pm, Shaun Jackman wrote:
> On Apr 5, 2005 2:10 PM, Rainer Weikusat <rainer.weikusat at sncag.com> wrote:
> > Shaun Jackman <sjackman at gmail.com> writes:
> > > On Apr 5, 2005 10:15 AM, Rob Landley <rob at landley.net> wrote:
> > >> On Tuesday 05 April 2005 01:48 pm, Shaun Jackman wrote:
> > >> > This patch modfies expr to use portable POSIX regex rather than BSD
> > >> > regex.
> > >>
> > >> Sounds cool.  Is there a functional difference, or is this just
> > >> syntax?  (I suspect that in uclibc both are wrappers over the same
> > >> functionality, but haven't confirmed it.)
> > >>
> > >> I just checked, and sed.c is using the posix regex already...
> > >>
> > >> Rob
> > >
> > > I believe it's primarily a syntax difference. I just noticed though
> > > that expr match behaves as if it has an implicit ^ before the regex,
> > > i.e. it's an anchored regex.
> >
> > That's what it's supposed to be according to POSIX.
>
> This updated patch implements an anchored regex by checking that the
> match starts at offset 0.
>
> Cheers,
> Shaun

Applied.

Rob

(Standing back to await the screams, by which I mean "play world of warcraft 
on my fiance's computer".)



More information about the busybox mailing list