Repository navigation
|
Most examples have a == for string equality match. How to use regex or simple things like %string% in logica predicates . |
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"]; |
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
likeoperator is available with Logica'sLikefunction.Also all of BigQuery functions with simple syntax are available in Logica came-cased.
Here is an example.