NetBSD Problem Report #34560

From sjamaan@frohike.homeunix.org  Tue Sep 19 20:02:07 2006
Return-Path: <sjamaan@frohike.homeunix.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 59B5563B9EE
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 19 Sep 2006 20:02:07 +0000 (UTC)
Message-Id: <20060919185228.E2A91F7E044@frohike.homeunix.org>
Date: Tue, 19 Sep 2006 20:52:28 +0200 (CEST)
From: Peter.Bex@xs4all.nl
Reply-To: Peter.Bex@xs4all.nl
To: gnats-bugs@NetBSD.org
Subject: Basic regexes do not match correctly when combining bound and backref
X-Send-Pr-Version: 3.95

>Number:         34560
>Category:       lib
>Synopsis:       Basic regexes go wrong when combining bound and backref
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 20:05:01 +0000 2006
>Last-Modified:  Sun Apr 06 04:20:01 +0000 2008
>Originator:     Peter Bex
>Release:        NetBSD 3.0.0_STABLE
>Organization:

>Environment:


System: NetBSD frohike.homeunix.org 3.0.0_STABLE NetBSD 3.0.0_STABLE (FROHIKE) #0: Thu May 25 14:15:21 CEST 2006 sjamaan@frohike.homeunix.org:/usr/src/sys/arch/amd64/compile/FROHIKE amd64
Architecture: x86_64
Machine: amd64
>Description:
	According to the documentation, the following basic regex:
	$ echo "axxxa" | sed "s/\(a\)x\{1,3\}\1/foo/"
	should result in:
	foo
	but it results in:
	axxxa

	What does work (ie, results in 'foo') is this:
	$ echo "axxxa" | sed "s/\(a\)x\{3,3\}\1/foo/"
	or this (backref only, no bound):
	$ echo "axxxa" | sed "s/\(a\)xxx\1/foo/"
	or this (bound only, no backref):
	$ echo "axxxa" | sed "s/\(a\)x\{1,3\}/foo/"
>How-To-Repeat:
	Just enter the sed commands and see for yourself.
>Fix:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: lib/34560: Basic regexes go wrong when combining bound and backref
Date: Sun, 6 Apr 2008 04:19:30 +0000

 Still happens in current of 20080229. (And on i386, so it's not a
 64-bit issue.)

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.