[BusyBox] Newline doesn't match $

Erik Andersen andersen at lineo.com
Tue Jun 13 16:55:51 UTC 2000


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:
> 
> [proskin at sunapee busybox]$ echo hi | ./busybox grep hi$
> [proskin at sunapee busybox]$ echo hi | grep hi$
> hi
> [proskin at sunapee busybox]$ echo hi | ./busybox sed -e 's/hi$/foo/'
> hi
> [proskin at sunapee busybox]$ echo hi | sed -e 's/hi$/foo/'
> foo
> 
> "man regex" mentions REG_NEWLINE, but our regex implementation doesn't
> seem to usderstand it.
> 
> >From what I see in regexp.c an attempt is made to match '$' regardless of
> flags. If this was the intention I'll try to fix it. Otherwise, we may
> want to document this limitation.

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!

 -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