I am trying to replace all occurrences of Secured="*" with Secured="testValue"
int testValue = 9;
string text = "Test blah Secured=\"6\" Test blah Secured=\"3\" ";
Regex r = new Regex("Secured=\".*\" ");
text = r.Replace(text, "Secured=\" \" + newValue.toString() + \"\" ");
Here is my method, the issue is it changes nothing?
[Published]
public string GetConvertedVdiXML(string myText, int newValue)
{
string text = myText;
Regex r = new Regex("Secured=\".*\" ");
text = r.Replace(text, "Secured=\" " + newValue.ToString() + " \" ");
return text;
}
The issue is it is not updating?