-
Notifications
You must be signed in to change notification settings - Fork 259
Regex implementation #562
Copy link
Copy link
Closed
Labels
enhancementlanguage-designChanges to PRQL-the-languageChanges to PRQL-the-languagemajor-featurepriority
Milestone
Description
An infix operator is probably worthwhile given how often regex matching is used.
Most implementations use a normal function like REGEXP or REGEXP_CONTAINS.
Postgres uses ~=, and !~ for negation. It also allows a trailing * for case insensitivity, like ~*.
Given we use == & != for equality, we could use =~ & !~ for regex? Or possibly the "close but not the same" as postgres is confusing there.
This is the first operator we'll have which will have very different implementations by dialect. I think we can probably do that with a regex(pattern, expr) method on the DialectHandler.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementlanguage-designChanges to PRQL-the-languageChanges to PRQL-the-languagemajor-featurepriority