I have the following string:
string error = "<MESSAGES><MESSAGE SEVERITY=\"2\" NUMBER=\"16\" TEXT=\"The Record Case is locked by user\" /></MESSAGES>";
I want to match between the TEXT=\" and the following \
I'm using the following expression var regex = new Regex(@"TEXT=\\""(.*?)\\");
Expresso tells me this regex is correct. RegExr tells me this regex is correct.
But C# disagrees.
I've tried
Groups[]and match.Value.\x22instead of"as I thought it might be an escape problem./TEXT=\""(.*?)\/g
All, to no avail.
What am I missing?


textattributeelem.Attribute("text").Valueetc...