Hi, I'm bringing in some data like the below and having a difficult time getting the expected output.
| name | expectedOutput |
| The Name Test | N |
| -Company Name | C |
| (k)Name, LLC | k |
| Test | T |
| 4 Your Test | 4 |
Using the below formula, I'm able to get all of the expected outputs except for the last one that starts with a number
if StartsWith([name],'the') then Substring([name],4,1)
elseif (REGEX_Match([name],'[a-zA-Z].*') or REGEX_Match([name],'\d.*[a-zA-Z]') = 1) then Substring([name],0,1)
else Substring([name],1,1)
endif
TEST OUTPUT:
| name | TEST Output |
| The Name Test | N |
| -Company Name | C |
| (k)Name, LLC | k |
| Test | T |
| 4 Your Test | |
Not sure what I'm missing. TIA