Build, test, and debug regular expressions
Matches Brazilian CPF (Cadastro de Pessoas Físicas) identification numbers with optional formatting, accepting both the standard form 123.456.789-00 and the unformatted 12345678900. It requires exactly 11 digits grouped as 3-3-3-2, with optional dots after the first two groups and an optional hyphen before the two check digits. Curiously, it also allows a trailing hyphen after the final digits, and it validates only structure, not the CPF checksum.