Split the String using new line

Hi all,

Can anyone help …

I want to split a String “10
ingredients” by using New Line in Split() and just print the 10 Value in message box

Thanks.

you can use Environment.Newline for splitting thee string by newline character
strString.Splt(Environment.Newline)

Try out this

Out_str=Yourstring.Split(Environment.newline).Last

Thanks
Robin

Hi @saritha

You can use Regular Expression as well.

image

Thank you.

Hey @saritha ,
please try this:
image


image
NewBlankTask11.zip (49.6 KB)

1 Like

wow. happy to see these many solutions for single question and all are valid in its own way. now @saritha decision to go in which way. :grin:

VbCrLf works for me usually, too, but the Environment.Newline is nice to know.

:joy: :joy: :joy: :joy: :joy:

Yeah, but in studioX everything works a bit different, so I had to check before I wrote anything in this post :slight_smile:

1 Like

Hi,

If you want to extract it using only Basic StudioX activities, can you try the Text to Left/Right activity as the following?

Regards,