Reputation: 7208
I'm looking for one regular expression that could match a string for three specific cases in a xml file:
Example:
Other possible combinations are invalid match.
Upvotes: 0
Views: 1716
Reputation: 75794
You cannot use regex to parse xml, it is not a regular grammar. Use an xml parser, seriously.
When you're using your parser to inspect text node values then and only then you might want to use (\".*?\")|(>.*?<)|(;.*?&)
but I doubt you'll find the problem is framed the same way. >MyString< is very suspicious.
Upvotes: 2