Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6D612B6AC5DCDA4580AF97B1068118AD2DC524@DGGEML501-MBX.china.huawei.com>
Date: Sat, 18 Apr 2020 11:07:20 +0000
From: "liheng (P)" <liheng40@...wei.com>
To: Florian Weimer <fw@...eb.enyo.de>
CC: Rich Felker <dalias@...c.org>, "musl@...ts.openwall.com"
	<musl@...ts.openwall.com>, "Xiangrui (Euler)" <rui.xiang@...wei.com>, Lizefan
	<lizefan@...wei.com>
Subject: RE: regex Back reference matching result not same as glibc
 and tre.

static const char pat[] = "\\(.?\\).?\\1";
string: "aba";

I tested this pattern by my test case just now.

musl:
# ./test
regexec failed
test regex failed

glibc:
# ./test
Invalid back reference
test regex failed

tre:
# ./test
Invalid back reference
test regex failed

-----Original Message-----
From: Florian Weimer [mailto:fw@...eb.enyo.de] 
Sent: Saturday, April 18, 2020 6:29 PM
To: liheng (P) <liheng40@...wei.com>
Cc: Rich Felker <dalias@...c.org>; musl@...ts.openwall.com; Xiangrui (Euler) <rui.xiang@...wei.com>; Lizefan <lizefan@...wei.com>
Subject: Re: [musl] regex Back reference matching result not same as glibc and tre.

* liheng:

> static const char pat[] = "(.?).?\\1";

> This commit reminds me that if i want to use back reference i should 
> not to tag REG_EXTENDED, but this test case matching still failed.


Did you change the expression to this for the basic regular expression test?

static const char pat[] = "\\(.?\\).?\\1";

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.