cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Whole Word String Search Function

It would be nice if there was a function within the string functions that would allow you to search a string for a whole word.  Example:

 

Right now there isn't an easy way to do this kind of thing.

 

BodyOfEmail = "I like cash."

 

WholeWord(BodyOfEmail,"cash") where it would return True

 

Today if you search for cash using contains:

BodyOfEmail = "I like cashmere." returns True as cash exists in the string.

 

You can use Split to break out the string but then you run into this problem...

bodyofemail="I like cash."

contains(split(bodyofemail,' '),'cash') and that will return false as "cash" does not equal "cash."

 

That being the case the only way to build it appears to account for all special characters which seems really awkward.

 

Would be nice to have a function that would tell you if a whole word is in a string.

Status: New
Comments
MarcBoes
Frequent Visitor

I would like to recommend a (imho) better request: Support for Regex in Flow - Power Platform Community (microsoft.com) and / or Regex function - Power Platform Community (microsoft.com). If you agree, would you vote those up? It covers your idea and more. Thanks!