Skip to content

Document a bug in Perl in 5.18.* #98

Open
@petdance

Description

@petdance

This should match, but doesn't.

$ echo 'x"firstname":"peter"' | ack '"firstname":"[^"]*"'

Take away the leading x and it succeeds

$ echo '"firstname":"peter"' | ack '"firstname":"[^"]*"'
"firstname":"peter"

Change the * to + and it succeeds.

$ echo 'x"firstname":"peter"' | ack '"firstname":"[^"]+"'
x"firstname":"peter"

Change firstname to z and it succeeds.

$ echo 'x"z":"peter"' | ack '"z":"[^"]*"'
x"z":"peter"

This happens in ack 2 as well. This is the simplest failing case I've been able to make so far.

I'm wondering if the ^ in the class negation is somehow getting translated into a ^ that anchors at the beginning of the string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions