Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?#Header Cielo 03)^0([\d]{10})([\d]{8})([\d]{8})([\d]{8})([\d]{7})([CIELO]{5})([03]{2})([I|P]{1})([\w\s]{20})([001]{3})([\w\s]{177})$|(?#RO Venda Cielo 03)^1([\d]{10})([\d]{7})([\d\s]{2})([a,\/,\s]{1})([\d\s]{2})(01)([\d]{6})([\d]{6})([\d]{6})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\d]{4})([\d]{5})([\d\s]{14})(00)([\d]{6})([\d]{2})([\d]{6})([\sRA]{1})([\d]{6})([\s]{2})([\d]{13})([\sCA]{1})([\d\S]{9})([\D\d]{14})([\d]{3})([\d]{22})([\d]{4})([\d]{5})([\d]{4})([\d\w\s]{2})([\w\s]{8})([\d]{3})([\s]{15})$|(?#CV Cielo 03)^2([\d]{10})([\d]{7})([\d\D]{19})([\d]{8})([\D\d]{14})([\d]{2})([\d]{2})([\w\s]{3})([\w\s]{6})([\d\s]{20})([\d]{6})([\d]{13})([\d]{2})([\d]{13})([\d\s]{13})([\d]{9})([0-2]{4})([\w\s]{8})([\s|TX|VE]{2})([\d\s]{20})([\d]{6})([\d]{29})([\w\s]{1})([\s]{32})$|(?#RO Pago Cielo 03)^1([\d]{10})([\d]{7})([\d\s]{2})([a,\/,\s]{1})([\d\s]{2})(01)([\d]{6})([\d]{6})([\d]{6})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\d]{4})([\d]{5})([\d\s]{14})(01)([\d]{6})([\d]{2})([\d]{6})([\sRA]{1})([\d]{6})([\s\d]{2})([\d]{13})([\sCA]{1})([\d\S]{9})([\D\d]{14})([\d]{3})([\d]{22})([\d]{4})([\d]{5})([\d]{4})([\d\w\s]{2})([\w\s]{8})([\d]{3})([\s]{15})$|(?#RO Serviço Cielo 03 Ajuste e Serviços)^1([\d]{10})([\d]{7})([\d\s]{2})([a,\/,\s]{1})([\d\s]{2})(02|03|04|05)([\d]{6})([\d]{6})([\d]{6})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\d]{4})([\d]{5})([\d\s]{14})(00|01|02|03)([\d]{6})([\d]{2})([\d]{6})([\sRA]{1})([\d]{6})([\s\d]{2})([\d]{13})([\sCA]{1})([\d\S]{9})([\D\d]{14})([\d]{3})([\d]{22})([\d]{4})([\d]{5})([\d]{4})([\d\w\s]{2})([\w\s]{8})([\d]{3})([\s]{15})$|(?#RO Enviado Banco Cielo 03)^1([\d]{10})([\d]{7})([\d\s]{2})([a,\/,\s]{1})([\d\s]{2})(01)([\d]{6})([\d]{6})([\d]{6})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\d]{4})([\d]{5})([\d\s]{14})(02)([\d]{6})([\d]{2})([\d]{6})([\sRA]{1})([\d]{6})([\s\d]{2})([\d]{13})([\sCA]{1})([\d\S]{9})([\D\d]{14})([\d]{3})([\d]{22})([\d]{4})([\d]{5})([\d]{4})([\d\w\s]{2})([\w\s]{8})([\d]{3})([\s]{15})$|(?#RO A CONFIRMAR Cielo 03)^1([\d]{10})([\d]{7})([\d\s]{2})([a,\/,\s]{1})([\d\s]{2})(01)([\d]{6})([\d]{6})([\d]{6})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\D\d]{14})([\d]{4})([\d]{5})([\d\s]{14})(03)([\d]{6})([\d]{2})([\d]{6})([\sRA]{1})([\d]{6})([\s\d]{2})([\d]{13})([\sCA]{1})([\d\S]{9})([\D\d]{14})([\d]{3})([\d]{22})([\d]{4})([\d]{5})([\d]{4})([\d\w\s]{2})([\w\s]{8})([\d]{3})([\s]{15})$|(?#Trailer Cielo 03)^9\d{11}.*$
/
gm

Description

no description available

Submitted by anonymous - 8 years ago