I still have problems applying regex syntax - and that some languages even use different dialects doesn't make things easier.
I want to remove all links containing a CID (whatever that is), replace them with empty string. So I defined:
private Regex regex = new Regex("<a href=\"cid:{[a-f0-9-]*}\">([^<])</a>");
and went for a replacement:
html = regex.Replace(html,"");
But for some reason or another, my Regex does not work.
The result still contains:
<a href="cid:c524ae03-7ac7-4823-9a28-af17a6acf12f">Test.txt</a>
I also tried the following:
new Regex("<a href=\"cid:[a-f0-9-]*\">([^<])</a>");
new Regex("<a href=\"cid:{([a-f0-9-]*)}\">([^<])</a>");
new Regex("<a href=\"cid:([a-f0-9-]*)\">([^<])</a>");
but I can't figure out what's wrong with my regex...