Skip to Content

Using match_regex function to replace “LIKE” function in Information Steward Rules

I came across a requirement in Information Steward, to create a Rule that looks for the word “Competitor” in the column string, The name of the columns was NOTES (lets just say).

This word”Competitor” can be at any location in the string and can be in case. If this word exists, then the rule should pass the value else fails it.

The equivalent SQL Query for this would be simple:

WHERE

UPPER(NOTES) LIKE ‘%COMPETITOR%’

But to do the same in the Rule, we do not have the LIKE function.

Instead, we had to use the following formula (using match_regex function) to perform the same task.

BEGIN

RETURN

match_regex($parameter0, ‘.*COMPETITOR.*’, ‘CASE_INSENSITIVE’);

END

This will do the trick.

Thanks,

Shaheen Makandar

Be the first to leave a comment
You must be Logged on to comment or reply to a post.