So, I have the following data in a single column:
10-Junior-32
101-Senior-23
102-Senior Pres-34
01-Senior Pres XYZ-30
and this is the desired output:
Junior
Senior
Senior Pres
Senior Pres XYZ
I am trying to subset the string between the "-".
Since neither the position is set or the number of characters to take out.
I can only think of regex which could subset the string between "-" and put it into a new column. That is the desired output.
Any thoughts or suggestions would be highly appreciated. Thanks!!!
Solved! Go to Solution.
Hi @rev,
I believe this should work: a formula tool creating your new column using the expression...
REGEX_Replace([f1], ".*-(.*)-.*", "$1")
... where [f1] is your original field.
The same concept can be achieved with the RegEx tool.
- John
Thanks John for your solution! I plugged it in and it worked.
Have a great day!
Thanks @MarqueeCrew for your input. There might be cases where there's more than just digits on either side of the "-" delimiter. Thanks!