Remove few words after meet specific words

Greeting,

How do I remove few words once the specific words is meet inside string. For example,

Apple Blue NO. : 4320980

I want to remove NO. : 4320980 so it become Apple Blue
The word “NO. :” didn’t change except the number behind.

Appreciate the simple guidance :smiley:

Hi,

Use split method
split(“Apple Blue NO. : 4320980”,“NO.”)(0)

or else build regex

Regards,
Dhanush

Thanks man, appreciate

1 Like

“Apple Blue NO. : 4320980”.Split({“NO.”},StringSplitOptions.None)(0)

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