From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6EB6A39450F2; Wed, 23 Sep 2020 00:38:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EB6A39450F2 From: "eggert at cs dot ucla.edu" To: glibc-bugs-regex@sourceware.org Subject: [Bug regex/26653] New: regex mishandles \b inside interval expressions Date: Wed, 23 Sep 2020 00:38:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: regex X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at cs dot ucla.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs-regex@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs-regex mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 00:38:44 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26653 Bug ID: 26653 Summary: regex mishandles \b inside interval expressions Product: glibc Version: 2.32 Status: NEW Severity: normal Priority: P2 Component: regex Assignee: unassigned at sourceware dot org Reporter: eggert at cs dot ucla.edu CC: drepper.fsp at gmail dot com Target Milestone: --- Created attachment 12855 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D12855&action=3Ded= it test program illustrating the \b-inside-interval regex bug The glibc regular expression code mishandles extended regular expressions s= uch as: (.*\band){2} although it correctly processes equivalent expressions such as: (.*(\<|\>)and){2} There is a similar problem with the same regular expression in BRE syntax: \(.*\band\)\{2\} To reproduce the problem, compile and run the attached file b-interval-bug.= c. It will exit with status 1, whereas the correct exit status is 0. This bug was reported against GNU 'sed' here: https://bugs.gnu.org/41558 and the original posting is from StackExchange, here: https://unix.stackexchange.com/questions/579889/why-doesnt-this-sed-command= -replace-the-3rd-to-last-and The original posting mentions backreferences but the bug occurs even without backreferences. --=20 You are receiving this mail because: You are on the CC list for the bug.=