Expression Column and Filters #2488
Unanswered
yangxuesong
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
This is poorly documented for sure - we're working on adding full docs for this. The issue here is that the regex engine we use has a unique interpretation of capture grouping, and will only match on a capture group (not a raw string). So just put your regex match in a capture group and it should work, e.g. use |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for your reply!
I need to use unicode chars in the '(SomePattern)', e.g '(北京)', there will
be an error: Invalid string token: (
Andrew Stein ***@***.***> 于2024年1月18日周四 04:37写道:
… This is poorly documented for sure - we're working on adding full docs for
this.
The issue here is that the regex engine we use has a unique interpretation
of capture grouping, and will *only* match on a capture group (not a raw
string). So just put your regex match in a capture group and it should
work, e.g. use '(SomePattern)' instead of 'SomePattern':
var v[2] := {-1,-1};
if (indexof("SomeColumn", '(SomePattern)', v) OR indexof(...)) {
'contains'
} else {
'not contains'
}
—
Reply to this email directly, view it on GitHub
<#2488 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAFOEDRH6KWXVYMKBSKCYLYPAZBJAVCNFSM6AAAAABBLJ3UH2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DCNRRGYZDK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use indexof function in expression column,
e.g.
var v[2] := {-1,-1};
if(indexof("SomeColumn", 'SomePattern', v) OR indexof(...)) {'contains'} else {'not contains'}
BUT not work as expected, can anyone provide a good example of how to use indexof function and OR operator to implement
string.containsfunction? Thanks in advance!BTW, if I set 'SomePattern' to some unicode string, there will be an error
Can I use OR between filters?
Beta Was this translation helpful? Give feedback.
All reactions