2
I am trying to capture a date inside a string using regex, but when I try to recover the part of the string returns me the following error:
analyzing " TARIFF:([ d/]+)" - Unrecognised exhaust sequence T.
match = Regex.Match(sbDados2.ToString(), @"\TARIFA:([\d\/]+)");
if (match.Success)
{
objDocInterfDoc.inicioVigencia = Validacao.ConverterCampoDateTime(new Entrada
{
Conteudo = Funcoes.RemoverEspacos(match.Groups[1].Value)
}).Data;
}
My string:
{BUDGET NUMBER~11727497~INSURANCE OFFER~ISSUE N. COMPANY PROPOSAL~PORT INSURANCE CIA GENERAL INSURANCE~06/06/2016~69 - 63703827~AVENIDA RIO BRANCO, 1489 - CAMPOS ELÍSEOS~RENOVA PORTO INSURANCE POLICY~TYPE OF INSURANCE:68 - 759817~PORTO RENOVATION~SÃO PAULO - CEP 01205-905~SITE: WWW.PORTOSEGURO.COM.BR~DIA 24H DURATION~TARIFA:08/06/2016~MAIO/2016~REGISTRATION CODE WITH SUSEP 05886~ATÉ AS 24H DO DIA~IMPRESSÃO:~08/06/2017~08/06/2016 - 09:26:12~C.N.P.J. 61.198.164/0001-60~EP SUSN.: 15414.000573/2006-42}
I want recovers part RATE:08/06/2016.
When I try to do through the regex101 , it correctly validates that part.
Try using this regular expression.
– gato
What was missing in the question to deny?
– Marco Souza
I do not know, for me there is no problem in the question.
– gato