[英]How do I search for a word in the entire XML using Regex?
In my XML I want to search for Text=" if it is not present then I want to do this 在我的XML中,我想搜索Text =“(如果不存在),那么我想这样做
XMLString = Regex.Replace(XMLString,@"(?<=<Run[^<]*)>", " Text=\"",RegexOptions.IgnoreCase);
Now whats the regex to find Text=" in the entire XML? 现在在整个XML中查找Text =“的正则表达式是什么?
if (Regex.IsMatch(XMLString," Text=\"")==false)
XMLString = Regex.Replace(XMLString,@"(?<=<Run[^<]*)>", " Text=\"",RegexOptions.IgnoreCase);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.