I'm trying to extract information that comes from reading email. But when it passes the match line, it bursts the following error:
{"analyzing \" (? si: (Information Type [^ \ d] + (? [\ d] +) | Information Type (? [\ d] +) - Invalid group name: group names must start with an alphabetic character. "}
I have already done several tests and could not identify, if anyone has an idea thank you.
string texto = @"<P CLASS=CS95E872D0><SPAN CLASS=CSE27513221><SPAN STYLE='FONT-SIZE:10.0PT'>&NBSP;</SPAN></SPAN><O:P></O:P></P>
<P CLASS='CS95E872D0'><SPAN CLASS='CSE27513221'><SPAN STYLE='FONT-SIZE:10.0PT'>TIPO DE INFORMAÇÃO: INFORMAÇÃO A SER RECUPERADA</SPAN></SPAN><O:P></O:P></P>
<P CLASS='CS95E872D0'><SPAN CLASS='CSE27513221'><SPAN STYLE='FONT-SIZE:10.0PT'>PERIODO: &NBSP;31/10/2013 A 31/10/2018</SPAN></SPAN><O:P></O:P></P>";
string pattern = @"(?si:({0}[^\d]+(?<Tipo de Informação>[\d]+)|{0}(?<Tipo de Informação>[\d]+)))";
pattern = string.Format(pattern, "Tipo de Informação");
Match match = new Regex(pattern).Match(texto);