i've to catch a value beetween angular brackets, I parse an'html page into a string (i can't use external library, so i have to use that html like a string). I have two div's content to catch, i know the id they have and i'm trying to catch the content by using regex, but i'm not able to do it.
var div_tags = Regex.Match(json, "<div id=(.*)</div>").Groups[0];
that returns me all the 3 div that i have with an id. but i only need of two div, wich id contains the word "mobile". So.. I tryed another regex suggested by a my coworker, but if think that it's not compatible with .net regex evaluetor.
string titolo = Regex.Replace(json, "<div id=[.*]mobile[.*]>(.*)</div>");
Thath's an example of the div. the only value i need is Message. The two div's ids are mobileBody and mobileTitle.
<div id='mobileBody' style='display:none;'>Message</div>
What's wrong in my regex that doesn't allow me to catch the correct text?