Can I split string with a string?

Hi I’m very new to RPA so I wanted to know how can I split a string where the words are not formatted properly for example “Hello worldmy name is”. I want the output data to be the “my name is”

Any help would be greatly appreciated thank you! <3

Hello @Regine

You can use Split method to Split the string.

Split(“Hello worldmy name is”,“world”)[1]

This will give you my name is

Hello @Regine

If you want to split a string with a multi-character string, you should use Split(yourString, yourDelimiter) method instead of yourString.Split("yourDelimiter"c)

If you want to extract the whole string after “Hello world” in a string, you can use:

Split(yourString, “Hello world”)

This will return a list which contains strings before and after “Hello world”

Since you want the first string after the first “Hello world”, you should use:

Split(yourString, “Hello world”)(1)

Regards,
Kardelen.

Hi! Thanks so much for the help!!

1 Like

I see, thank you so much for the help!!

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