Skip to content

Matching result not same as glibc regex #74

@Hengliy

Description

@Hengliy

Hi, I test tre-regex comparted with glibc-regex and have some discover:

text = "a"
pattern = "(.?).?\1"

glibc-regex:

matching: "a"
pmatch[0].rm_so = 0
pmatch[0].rm_eo = 1

matching: ""
pmatch[1].rm_so = 0
pmatch[1].rm_eo = 0

tre-regex:

matching: ""
pmatch[0].rm_so = 0
pmatch[0].rm_eo = 0

matching: ""
pmatch[1].rm_so = 0
pmatch[1].rm_eo = 0

Is this a bug?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions