Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Keyword search

hkcheunghk
5 - Atom

Hi,

 

I need to search the content of [Field A] for the value of another field [Keyword Field].   However, the hit of the following pattern should be my positive results:

 

1. " " + [Keyword Field] + " "

2. " " + [Keyword Field] + "."

3. " " + [Keyword Field] + ","

4. " " + [Keyword Field] + end of line

5. Start of line + [Keyword Field] + " "

6. Start of line + [Keyword Field] + "."

7. Start of line + [Keyword Field] + ","

8. Start of line + [Keyword Field] + end of line

 

Instead of writing Contains statement in each of those cases, is there any more efficient way to do the search by using other function, such as regular expression.

5 REPLIES 5
Warcry
9 - Comet

Does this solve your problem, if so, accept as the solution

hkcheunghk
5 - Atom

Hi,

 

Instead of writing 8 contains statements and connecting them with "OR", I wonder any more efficient ways to use only 1 function / formula / regular expression can achieve the same results.

Warcry
9 - Comet

I just gave you one unless you are not explaining your use case completely.

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @hkcheunghk 

 

How about this RegEx?

 

REGEX_Match([Field A], "^\s?" + [Keyword Field] + "[\.,\s]?$")

hkcheunghk
5 - Atom

Hi,  

 

Thank you, Yoshiro.  However, the RegEx is not working.  I have tried this in filter tool and formula tool, both are not working. 

Labels
Top Solution Authors