smac11shl

Getting all text after an underscore

Discussion created by smac11shl on Mar 9, 2012
Latest reply on Aug 15, 2017 by J_File

I am looking to find a calulation that will give me all of the text after an underscore, for example:

 

If I have a field and the text is ORD_SHP_20120208, I would like to get all of the text after the second underscore. With this example I can use many functions such as left, right, LeftWords, etc... however, what is the first two words vary in length? Or the last section is more than one word?

 

So I would have

 

Record 1:

ORD_SHP_20120208 --> Result: 20120208

 

Record 2:

ORD_SHP_20120208 9384 --> Result: 20120208 9384

 

Record 3:

ORD_SHP9323_20120208 8475 --> Result: 20120208 8475

 

 

I would like to be able to use the replace function to get the last section in each record - so I am assuming I would need some sort of calculation.

 

Any Ideas?

 

Thank you in advance!

Outcomes