[BusyBox] Newline doesn't match $
Erik Andersen
andersen at lineo.com
Tue Jun 13 23:59:29 UTC 2000
On Tue Jun 13, 2000 at 05:21:04PM -0600, Mark Whitley wrote:
> On Tue, Jun 13, 2000 at 10:55:51AM -0600, Erik Andersen wrote:
> > On Tue Jun 13, 2000 at 11:24:04AM -0400, Pavel Roskin wrote:
> > > Hello!
> > >
> > > We have a problem with regular expressions - '$' doesn't match the
> > > newline:
>
> [snip]
>
> >
> > Yeah. This one has been listed as a known bug in the TODO file
> > for quite a while now. Mark Whitley has looked into what it will
> > take to fix it, and he has pronounced it to be difficult. If you
> > have some time to try and fix it, that would be great!
>
> Here's basically the (glaring) problems with the current implementation that
> I've discovered:
>
[------analysis of why BusyBox regexp support sucks snipped-----]
>
> I'm pretty sure I can churn out something that will be better than the
> existing implementation, but the only guarantee that I will make is that it
> won't be perfect. Hopefully, it will be better, though. Making the transition
> might be a bit tricky. When the time comes to drop the new stuff in place,
> I'll ask for help testing. Thanks in advance.
Tell you what. Lets not reinvent the wheel. GNU libc has regexp support.
Libc5 has regexp support. I just double checked and uC-libc has regexp
support.
When I swiped elvis-tiny's regexp support and hacked it into BusyBox, my
thought was that sometime I would put together an embedded Libc -- one that
wouldn't have all the crap in GNU libc. I had a fuzzy picture in my mind as to
what would and would not be "allowed" in BusyBox. regexp was not going to be
included. getopt was not going to be included. glibc nss would not be
included. etc.
Well, now that I believe that uC-libc is the One True embedded libc, it turns
out that it supports some things that were in my "to-be-avoided" list, like
regular expressions, and getopt (but not getopt_long) support...
The point of all this, is that I now believe the right solution is to use the
libc provided regexp support and throw away the stuff currently in BusyBox. It
is probably the right move to switch to using getopt as well.
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list