Hi all,
I have a string column with varying lengths of text and varying numbers of spaces. I'd like to isolate the text following the last space at the end of the string. Any ideas about how I can do that?
Thanks,
Cogency
e.g. If the text read 'AAAA 12345 BBBB CCCC' I'd like to create a column that shows 'CCCC'.
I've found a 3-step solution
1. Reverse = reverse([String_Column])
2. ParseReverse = substring([Reverse], 1, position(' ', [Reverse])-1)
3. ReverseParseReverse = reverse([ParseReverse])
It's a bit long-winded but it works.
You can use regular expressions:
substring_regex ('\b\w+\W*$', [String_Column])