[Bug 5246] New: sed global replace misses replacements

bugzilla at busybox.net bugzilla at busybox.net
Fri May 25 15:44:37 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5246

           Summary: sed global replace misses replacements
           Product: Busybox
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: bugdal at aerifal.cx
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


For example:

$ echo hello | busybox sed 's/l*/@/g'                                           
@he at o                                                                           
$ echo hello | sed 's/l*/@/g'                                                   
@h at e@o@                                                                         

The latter behavior (GNU sed) is the expected, conformant behavior.

It looks to me like sed has an off-by-one error advancing the position to
search for the next match after making one replacement.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list