i am sure thats an easy one but im missing something...
i have 2 strings:
String x = "ows__x05de__x05e1__x05e4__x05e8__x00"
String y = "ows__x05de__x05e1__x05e4__x05e8__x000"
the difference between the strings is the additional '0' in String y.
i have an XML document that has this 2 strings in it multiple times. i need to replace String x to "CustName" and String y to "CustNumber" clearly i cant use the .Replace() method because string x and string y are identical to this method. i have tryed to use Regex.Replace():
string XMLdummy = "ows__x05de__x05e1__x05e4__x05e8__x00='custName....' ows__x05de__x05e1__x05e4__x05e8__x000='33346464...'";
Regex rx = new Regex("^ows__x05de__x05e1__x05e4__x05e8__x00{1,36}$");
string result = rx.Replace(XMLdummy, "CustName");
Regex rx2 = new Regex("^ows__x05de__x05e1__x05e4__x05e8__x000{1,37}$");
result = rx2.Replace(XMLdummy, "CustNumber");
System.Diagnostics.Debug.WriteLine(result);
nothing happen and the result is equal to XMLdummy original string.
The required result should be:
CustName='custName....' CustNumber='33346464...'
