Delete a specific sequence of words if exists

Hi I would like to check if a specific sequence of word exists in a string and if it does it should be deleted.

An example with the sequence “a green frog and”:
StringVar=“There is a lake with a green frog and a bird.”
-> Now the Robot would transform it to “There is a lake with a bird.”
Any ideas how I could solve that?
Thank you

You can String.Replace

StringVar.Replace("a green frog and","")

1 Like

Thanks a lot, I was looking to far :sweat_smile:

1 Like

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