Active IQ Unified Manager Discussions

Regex in filter with variable

dblackwe

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

@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

@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

sinhaa

@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.
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

Public