Skip to content

str_replace errors when using "$" as a replacement. #83

@dkesh

Description

@dkesh

The code below works for me on some boxes, but not others and I am attempting to figure out what the difference is:

> stringr::str_replace("aba", "b", "$" )
Error in stri_replace_all_regex(x, c("\\$", "\\\\(\\d)"), c("\\\\$", "\\$$1"),  : 
  Unknown ICU error. (U_REGEX_INVALID_CAPTURE_GROUP_NAME)

Enter a frame number, or 0 to exit   

1: stringr::str_replace("aba", "b", "$")
2: fix_replacement(replacement)
3: stri_replace_all_regex(x, c("\\$", "\\\\(\\d)"), c("\\\\$", "\\$$1"), vecto

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