Reputation: 354
In my XML I want to search for Text=" if it is not present then I want to do this
XMLString = Regex.Replace(XMLString,@"(?<=<Run[^<]*)>", " Text=\"",RegexOptions.IgnoreCase);
Now whats the regex to find Text=" in the entire XML?
Upvotes: 0
Views: 88
Reputation:
if (Regex.IsMatch(XMLString," Text=\"")==false)
XMLString = Regex.Replace(XMLString,@"(?<=<Run[^<]*)>", " Text=\"",RegexOptions.IgnoreCase);
Upvotes: 1