I'm looking for data that begins with "0110" followed by several more numbers and some letters. I want to say if the data begins with "0110", then "comment" else "". Right now I have
IF REGEX_Match([column],'^0110\d+') then "comment" else "" endif
However this is not picking up anything. I'm assuming it has something to do with the 'd' in the formula. How can I adjust this so that it will find the correct information? Thanks!
Solved! Go to Solution.
Does this work for you?
IIF(REGEX_Match([column], '^0110\d+.*'),'Comment','')
Thanks for your quick reply, however, that did not solve the issue for me.
Can you provide some sample text and expected results? When I tested it with data as described, I got the result I was expecting. To be clear, the logic I am using is the exact 4 digits 0110 followed by at least 1 digit and then any number of digits or characters. I could be missing something.
It seems to be working for me. Is there a specific row that its not putting "comment" in for you? or is it not working at all? I have added a filter at the end to show values with "comment". See attached.
If your data has spaces (the excel you shared seemed to work), try using the cleansing tool to clean up those spaces.
Yup, the extra space is the issue.
IIF(REGEX_Match([CPSC], '^0110\d+.*\s*'),'Comment','')