Test, validate and match regular expressions
Matches Brazilian CPF (11-digit personal tax ID) or CNPJ (14-digit company tax ID), with or without common formatting masks (dots, dash, slash). The first alternative validates CPF, the second validates CNPJ, allowing optional separators in their standard positions. Useful for form validation and data cleaning of Brazilian documents.