I cannot parse the xml because at this stage it is invalid and will not parse.
How would I match a simple xml element (with the id) like so:
<g id="crop"></g>
Using a regular expression?
Thanks
How would I match a simple xml element (with the id) like so:
<g id="crop"></g>
Using a regular expression?
Thanks
At the risk of a downvote... How about using the right tool for the job?
var xmlStr = "<g id=\"crop\"></g>";
var att = XElement.Parse(xmlStr).Attribute("id");
var id = (string)att;