Hello guys,
i have a string and i would like to retrieve every digit character(including the '-' unitl the first char character..)
So in case of input,
811-1030 SOMETHING - WHATEVER TRASPORTATION & WHATEVER
512-0100 SOMETHING - WHATEVER (Direct)
448514 Whatever
179 Whatever 8,
i would like the output will be :
811-1030
512-0100
448514
179
Any idea?
Thank you
Solved! Go to Solution.
if you want to do it using regex you could use a regex like this one (.+\d)\s(.+)
But I would more likely advise you to use a text to columns tool with a space separator, it will split your column into 2 columns, and you only have to keep the first one. Performance wise it will be better and easier to maintain.
@Anastasio_Theohari @Another way of doing this by the REGEX_Replace formula in the formula tool
REGEX_Replace([data], ‘(.+?)\s.*’, ‘$1’)
edit: misread question, but couldn't delete ¯\_(ツ)_/¯
personally if the first word is what you're after:
getword([text],0)
is the expression that I'd recommend.
Cheers,
mark