Four Stars

extracting a string after a character

I have the following:

LI04_1503

AS03_18456

AS03_P45

...

I'm using  StringHandling.LEFT(row1.SOURCE_SITE_ID,4)  this extracts the first 4 elements, but what I need is to select everything after the '_' so the result would be:

1503

18456

P45

I'm a beginner, can anyone help me with this string manipulation?

Thanks,

Gary

 

2 REPLIES
Moderator

Re: extracting a string after a character

Hello,

Could you please try this method StringHandling.LEFT(row1.SOURCE_SITE_ID,5) to see if it works?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: extracting a string after a character

StringHandling.LEFT(row1.SOURCE_SITE_ID,5) removes the first 5 characters from the left, however, in my example the number of characters to be removed varies, I need to remove either everything before and including the _ to the left or right. I'm trying to get into Regex syntax to see if that has what I need.