Skip to content

Unexpected results for str_starts() when use pattern containing "|" #449

@psychelzh

Description

@psychelzh

See the following example:

stringr::str_starts("A1", "T")
#> [1] FALSE
stringr::str_starts("A1", "\\d")
#> [1] FALSE
stringr::str_starts("A1", "T|\\d")
#> [1] TRUE

Created on 2022-07-31 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions