cancel
Showing results for 
Search instead for 
Did you mean: 

Match Function and Lists

_ck
Level 2

I'm trying to filter paths from a query - does anyone know if it's possible to have a list within a fuction?  Or maybe there's another way to get at this.

 

Neither work, but had been thinking something like:

MATCHI(parent.name, ("/foo/bar/*", "/foo1/bar2/*"))=1 

or 

MATCHI(parent.name, IN ("/foo/bar/*", "/foo1/bar2/*"))=1 

 

1 REPLY 1

JRuss
Level 3
Employee

With the MATCHI functions you cannot use a list of patterns.  You would have to generate a single regex pattern that matches multiple strings.  

Example:

If you had a column COL1 contain one of four values "one","two","three","four" and wanted the MATCHI function to return true when it encounters "one" and "two".  You would generate a pattern something similar to this

Pattern: '(one|two)'

Function: MATCHI(COL1,'(one|two)')