Date: Mon, 29 Feb 2016 20:18:43 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: musl-mailinglist <musl@...ts.openwall.com>, mailinglist <openwrt-devel@...ts.openwrt.org> Subject: Re: regex issue / asterisk / musl / sed * Szabolcs Nagy <nsz@...t70.net> [2016-02-29 14:53:48 +0100]: > * Bastian Bittorf <bittorf@...ebottle.com> [2016-02-29 13:57:36 +0100]: > > root@box:~ echo 'o*o' | sed -e 's/*/asterisk/g' > > sed: bad regex '*': Invalid regexp > > root@box:~ echo 'o*o' | sed -e 's/\*/asterisk/g' > > oasterisko > > > > it's musl 1.1.14 on OpenWrt / r48814 > > both commands are working fine with glibc and uclibc > > but the first invokation fails with musl 1.1.14 but > > works with musl 1.1.13. unsre if the prob is on my > > side, maybe $you have an idea... > > yes, i introduced this regression in > http://git.musl-libc.org/cgit/musl/commit/?id=7eaa76fc2e7993582989d3838b1ac32dd8abac09 > > because i missed the special * behaviour for BRE, > but even before that ^* was broken so just reverting > the patch is not enough, handling * after an anchor > or assertion correctly needs more code changes. a possible fix is attached, the handling of ^ and $ in BRE is suboptimal, but that will need a bigger refactoring. View attachment "0001-fix-at-the-start-of-a-BRE-subexpression.patch" of type "text/x-diff" (1137 bytes) View attachment "0002-fix-at-the-start-of-a-complete-BRE.patch" of type "text/x-diff" (1225 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.