After trying to search for an answer, I can see the frustration with this. I have a formula where I'm trying to search for a carriage return or a line feed anywhere within cells of a spreadsheet. The following is the formula
Contains([Value],"&") or
contains([Value],"&#") or
contains([Value],"/*") or
contains([value],"--") or
contains([Value],"<") or
contains([Value],">") or
contains([Value],"‘") or
contains([Value],"#") or
contains([Value],"“") or
contains([Value],"'") or
REGEX_Match([Value], "\n+") or
REGEX_Match([Value], "\r+")
The last 2 aren't working. Just for grins, I tested with
REGEX_MATCH([Value],"1+")
What this does is return true on fields that are equal to just "1" but will not return true for fields *containing* the number "1".
I must be missing something. W3Schools says placing a + after the character you're searching for should search for the character anywhere in the string.....
Solved! Go to Solution.
This this...
Contains([Value],"&") or contains([Value],"&#") or contains([Value],"/*") or contains([value],"--") or contains([Value],"<") or contains([Value],">") or contains([Value],"‘") or contains([Value],"#") or contains([Value],"“") or contains([Value],"'") or REGEX_Match([Value], ".*[\n\r].*")
When you're matching, it needs to qualify the entire string. Your original expression was saying to match if the [Value] contains ONLY a new line/return character 1 or more times and nothing else.
Hope this helps!
Jimmy
Thanks. REGEX is gonna be a loooong road for me....