Consider the below
Case 1: [Success]
Input : X(P)~AK,X(MV)~AK
Replace with: AP
Output: X(P)~AP,X(MV)~AP
Case 2: [Failure]
Input: X(P)~$B,X(MV)~$B
Replace with: C$
Output: X(P)~C$,X(MV)~C$
Actual Output: X(P)~C$B,X(MV)~C$B
I am using the below REGEXP
@"~(\w*[A-Z$%])"
This works fine for case 1 but falied for the second.
Need help
I am using C#3.0
Thanks