Skip to content

fixed_regex_linter() fails when encountering "\\;" #1545

@MichaelChirico

Description

@MichaelChirico
lintr::lint('strsplit(x, split = "\\\\;")\n', lintr::fixed_regex_linter())
# Error: '\;' is an unrecognized escape in character string starting ""\;"

But the code itself is fine:

strsplit('a;b', '\\;')
# [[1]]
# [1] "a" "b"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions