Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?i)(?m)(?<!Telefone:|Tel.|Telefone|Telef:|Fax:|Fax.|Fax|Telefone.|Telefone.:|Telef.:|Tel.:|Fax.:|Telefone |Fax |Pagamento[\n]|Pagar[\n]|\d)([\s|\:|PT|CRC|Coletiva|Nº|Contribuinte:|NIF:|Nipc:]{1})([1259]\d{2})[ ]{0,1}(\d{3})[ ]{0,1}(\d{3})(?=[\s|\D]{1})
/
g

Description

Encontra números de contribuinte (NIF's) num documento

Submitted by anonymous - 8 years ago