Murray Brown
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"
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER