Skip to content

str_detect always treats pattern as fixed string #168

@dlindelof

Description

@dlindelof

When str_detect is used in a call to filter on a tbl, I expect pattern to be treated as a regular expression. Instead, it seems that it is treated as a fixed pattern:

> MASTER %>% filter(str_detect(FOO, "pen$")) %>% show_query
<SQL>
SELECT *
FROM "MASTER"
WHERE (INSTR("FOO", 'pen$') > 0)

The SQL INSTR function performs a case-insensitive search, and does not treat its second argument as a regex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorfunc trans 🌍Translation of individual functions to SQLwipwork in progress

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions