sed bug grouping

William Roeder <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
Html/pdf docs () for 1) for postfix operators, like \(abcd\)* and 2) 
back references. The problem is when using *both*.
echo 12345ab|sed -r "s/^([^a]{3})*(a)/<\1><\2>/"
12345ab
does not match as expected

echo 123456ab|sed -r "s/^([^a]{3})*(a)/<\1><\2>/"
<456><a>b
expected <123456><a>b

adding a second grouping is a work around
echo 123456ab|sed -r "s/^(([^a]{3})*)(a)/<\1><\3>/"
<123456><a>b
 >echo 123456a123ab|sed -r "s/(([^a]{3})*)(a)/<\1><\3>/g"
<123456><a><123><a>b

C:\Users\Bill>sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.

The [email protected] address is in the pdf chapter 7 so I cc'ed there.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.