NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

Regex in filter with variable

dblackwe
4,716 Views

How do we use regex in a filter?

 

When I do..

where column regex '${variable}$'

 

I want where column ends with variable, but $ and {} are both regex code bits and I can't get the sql query I need.  Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

sinhaa
4,620 Views

@dblackwe

 

Where columns REGEXP '${Exp}'

 

 

So now Exp becomes a parameter for the Filter. While testing it, provide any expression as you want. If you need 'ends with 01' provide the value of Exp : 01$

 

Ends in a-z : [a-z]$

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

sinhaa
4,621 Views

@dblackwe

 

Where columns REGEXP '${Exp}'

 

 

So now Exp becomes a parameter for the Filter. While testing it, provide any expression as you want. If you need 'ends with 01' provide the value of Exp : 01$

 

Ends in a-z : [a-z]$

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

sinhaa
4,601 Views

@dblackwe

 

I can suggest another way. If you are finding it difficult to get your filter SQL with REGEXP then just don't have a regexp in filter SQL at all. Have it as a  plain parameter like

 

WHERE column LIKE '%${varible}'

 

So now your filter has a parameter, $variable

 

In workflow User-Input, you can define your Regex for this string $varibale. So this will give you the desired result.

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public