Page 1 of 1

Filter with Regular Expression

Posted: Sun Jan 07, 2018 10:57 am
by dfriasb
Hello all,

Where can I find the syntax for filtering using Selection Filter widget with Regular Expressions?
I'm trying expressions like "2+1", "=2+1", etc. but they are not working...

Thanks!!

David

Re: Filter with Regular Expression

Posted: Mon Jan 08, 2018 11:06 am
by andrew
Regular expressions can be used to define a search pattern. Regular expressions can be very complex, but there are also some simple but useful ones:

"ABC.*" matches layers starting with "ABC"
".*ABC" matches layers ending with "ABC"
".*ABC.*" matches layers containing "ABC"
"[1-4]" matches numbers 1 to 4
"\d" matches a digit

More information:
https://regexone.com/
http://www.rexegg.com/regex-quickstart.html
and others...

This examples would match everything on layers "layer 2" and "layer 3":
Screen Shot 2018-01-08 at 09.56.58.png
Screen Shot 2018-01-08 at 09.56.58.png (51.55 KiB) Viewed 3442 times

Re: Filter with Regular Expression

Posted: Mon Jan 08, 2018 11:23 am
by dfriasb
Very interesting!
Thank you!!