-
Most examples have a == for string equality match. How to use regex or simple things like %string% in logica predicates . |
Beta Was this translation helpful? Give feedback.
Answered by
EvgSkv
May 30, 2021
Replies: 1 comment
-
SQL's Word("dog");
Word("cat");
Word("dome");
Word("house");
MatchingWord(x) :- Word(x), Like(x, "do%");
RegexpExtractExample(y) :- Word(x), y == RegexpExtract(x, "o(.)");
RegexpMatchExample(x) :- Word(x), true == RegexpContains(x, "^...$"); Functions that aren't supported out-of-the-box can be implemented with @Engine("sqlite");
Q(s) = SqlExpr("{s} GLOB '{glob}'", {s:, glob: "*a*"}) :-
s in ["cat", "dog", "bag", "tag", "fire"]; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jedi1992
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SQL's
like
operator is available with Logica'sLike
function.Also all of BigQuery functions with simple syntax are available in Logica came-cased.
Here is an example.