Hi
I am trying to use a Regex formula to return a result based on certain text being included in a text string,
The formula I am using is
if REGEX_Match ([Subject], "DTDF\s\D.*") then
"DTDF"
Else
"[Area]"
endif
Data
Subject | Received | Size | Area |
DTDF Assignment | 09/10/2024 | 50 KB | DTDF |
DTDF Assignment | 27/09/2024 | 111 KB | DTDF |
DTDF Assignment | 08/10/2024 | 91 KB | DTDF |
CBSI DTDF | 11/10/2024 | 306 KB | EMEA |
However, this is only working if DTDF is at the beginning of the string and not when it is within the string.
Can someone tell me how to amend the formula so it will work for all rows that include this text please?
Solved! Go to Solution.
Hi @Carlyn
Are you expecting output like this...
if contains([Subject],"DTDF")
then "DTDF"
Else [Area]
endif
Many thanks
Shanker V
yes! that was simpler than I thought. Thank you!