Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Replace first longer then shorter strings

Hi

I have a long string in which I first need to replace longer words and then single chatacter.
At the moment I enclose the replaced parts in square brackets so wondered if there was a way to avoid the replaced parts:

For example

Replace("code 1 will be used on platform C" ,"code 1","[C1235])
this results in "[C1235] will be used on platform C"

now if I want to Replace("[C1235] will be usedon Platform C" ,"C","D")

how do I ignore the part enclosed in brackets to get  "[C1235] will be usedon Platform D"
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

thanks