Split string at second character

Hello - Anyone know how to always split a string at the second defined character?

In this example I always want to split the string at the last AM (sometimes there will only be one AM) the string is “JBLXTREME3CAMOAM” but sometimes it might be “JBLXTREME3CAMO”

Anyone know how to do this?

THanks

Hi @cbot ,

Could you give this a try?

image

str_variable.Substring(0,str_variable.LastIndexOf("AM"))

Kind Regards,
Ashwin A.K

Hi @cbot ,

Could you Provide us with what should be the Expected Output for the Input data that was Provided ?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.