Skip to content

Drop-in replacement for grep #129

@Robinlovelace

Description

@Robinlovelace

I assume there's a good reason why this seems not to have been done. However, I can't see it and think it would make it easier for people used to base regex to switch. str_which() could be a good option. Could put in a PR but wanted to check if this is something that would be useful.

grep("z", letters)
## [1] 26
 which(str_detect(letters, "z"))
## [1] 26

Context:

http://stackoverflow.com/questions/37996050/stringr-equivalent-to-grep/38012671?noredirect=1#comment66496080_38012671

csgillespie/efficientR@53c9643

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