Skip to main content

Trying to get a RegEx statement to capture multiple options for a string. Currently have written:

 

IF CONTAINS ((REGEXP_MATCH([Campaign],'(*doppio*|*credit*)')))

 

THEN 'Display'

 

END

 

Why would I be getting the error message, "CONTAINS is being called with (boolean) , did you mean (string,string)?"

 

Seems like I'm just missing a syntax issue.

 

It should be finding 'doppio' in [Campaign] like '2019_SMB_AlwaysOn_RT_DoppioAdDaptive_Display' or '2019_SMB_NetworkSolutions_Awareness_Pros_DoppioAdDaptive_Display'

 

Thanks!

11 answers
  1. Jun 27, 2019, 6:09 PM

    Hi,

     

    Try this,

     

    IF REGEXP_MATCH(LOWER([Campaign]),'doppio|credit')     

    THEN 'Display'

    END

     

    Note: Used lower() just to match the case with the sub-string which you've put in expression. If you've to search more sub-string then use "|" within the string like... 'doppio|credit|xyz...|abc..'

     

    Hi, Try this, IF REGEXP_MATCH(LOWER([Campaign]),'doppio|credit') THEN 'Display'END Note: Used lower() just to match the case with the sub-string which you've put in expression.

    Hope this will help.

     

    Mahfooj

0/9000