Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Match Regular expression with tFilterRow

Hi
I tried to use advanced settings of tFilterRow to filter dataflow with regexp, but lacking java knowledge stopped me 0683p000009MACn.png
Could someone paste a sample java code for matching with regexp?
Thanks in advance
Labels (3)
11 Replies
_AnonymousUser
Specialist III
Specialist III
Author

Here is the solution.
It seems the v5 can not handle expression like "12206|12906|16006" or even ("\"12206\"|\"12906\"|\"16006\"") in the basic condition.
Using advance mode does not work either for things input_row.etab.matches("12206|12906|16006")
So I used java.util.regex.Pattern.compile("12206|12906|16006").matcher(input_row.etab).find() to filter my data .
And this time it works .
Hope this help, someone else .
Happy new year .

Hi ,
I tried to use the advance mode in the tFilterRow to use a regex .
here is the regex : input_row.etab.matches("\"12206\"|\"12906\"|\"16006\"") (i also tried without the \ )
heres is the data I wont to filter :12206 - CR22
12906 - CR29
13306 - CRAQ
13606 - CRIV
14445 - CEBPL
14706 - CRAV
16006 - CR56
16275 - CENFE
17906 - CRAM
18025 - CEPIC
19406 - CRTP

at the end i should have the row with
12206 12906 et 16006.
Instead I got nothing .
What did I miss ??
PS , I also tried : java.util.regex.Pattern.matches("12206|12906|16006", input_row.etab) and got the same results.
_AnonymousUser
Specialist III
Specialist III
Author

Hello,
this works very well. I have an additional question:
How can I customize the error message from the advanced condition.
I would like the error message to not state "advanced condition failed" but "irregular e-mail adress" for example
thanks for any input!