Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?=(?:""\s+?Controle\s*Fiscal[\w\W]+?)?""\s+(?<NomeUc>[\w\W]+?)$(?:.*?)""\s+?(?<Cnpj>\d{14})\s*(?:.*?)(?<MesReferencia>\d{2}\/\d{4})(?:.*?)(?<DtEmissao>\d{2}\/\d{2}\/\d{4})(?:.*?)\d{2}\/\d{2}\/\d{4}\s+(?<NumFatura>\d+)\s+(?:.*?)(?<ExternalCode>\d+-\d+)\s+(?:.*?)(?<DtVencimento>\d{2}\/\d{2}\/\d{4})\s+(?:.*?)(?<VlrTotalFatura>[0-9\.]+,?\d*)(?:.*?)Consta\snesta\sfatura\s*R.\s(?<VlrPisCofins>[0-9\.]+,?\d*)\sreferentes\sa\s(?:.*?)(?<AliqPis>[0-9\.]+,?\d*)%\sde\sPIS\se\s(?:.*?)(?<AliqCofins>[0-9\.]+,?\d*)%\sde\sCOFINS(?:.*?)\)\s+\d+\s+(?:\d+)?\s+(?<VlrBaseIcms>[0-9\.]+,?\d*)(?:.*?)""\s+(?<AliqIcms>\d+)\s+(?:.*?)^(?<DContratadaFp>[0-9\.]+,?\d*)\s+(?:.*?)[0-9\.]+,?\d*\s+(?<VlrIcms>[0-9\.]+,?\d*)\s+(?:.*?)""\s+(?<DataLeituraAtual>\d{2}\/\d{2}\/\d{4})\s+(?:.*?)(?<DataLeituraAnterior>\d{2}\/\d{2}\/\d{4})\s+(?:.*?)""\s+(?<LeituraAtualCFp>[0-9\.]+,?\d*)\s+(?:.*?)(?<LeituraAnteriorCFp>[0-9\.]+,?\d*)\s+(?:.*?)(?<ConstanteConsumoFp>[0-9\.]+,?\d*)\s+(?:.*?)(?<CMedidoFp>[0-9\.]+,?\d*)\s+(?:.*?)(?<LeituraAtualCP>[0-9\.]+,?\d*)\s+(?:.*?)(?<LeituraAnteriorCP>[0-9\.]+,?\d*)\s+(?:.*?)(?<ConstanteConsumoP>[0-9\.]+,?\d*)\s+(?:.*?)(?<CMedidoP>[0-9\.]+,?\d*)(?:.*?))
/
msu

Description

no description available

Submitted by anonymous - 4 years ago