perl's s2p(1) produces non-equivalent perl for simple sed substitution

Bug #1008584 reported by Ralph Corderoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
perl5
Unknown
Unknown
perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Compare

    $ sed 's/c*$/x/g' <<<abc
    abx
    $ s2p 's/c*$/x/g' | perl - <(echo abc)
    abxx
    $

sed's behaviour is correct for sed. The Perl that s2p(1) produces
doesn't do the equivalent substitution, instead matching zero c's and
the end of the string after the first substitution of c by x.

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

It should be trivial for anyone who knows regexps to "confirm" this bug so it gets some TLC. Go on, be a karma whore!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.