PHP code example of alerrandro / validador-e-regex

1. Go to this page and download the library: Download alerrandro/validador-e-regex library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alerrandro / validador-e-regex example snippets



Alerrandro\Regex\Validadores\Cpf;

Validador::cpf('000.000.000-00'); // false

Validador::cpf('00.000.000/0000-00'); // false



Alerrandro\Regex\RegexBr\Regex;

Regex::removerCaracteresEspeciais('abc!@#'); // abc

Regex::removerLetras('abc123'); // 123

Regex::removerNumeros('123abc'); // abc

Regex::removerLetrasECaracteresEspeciais('abc123!@#'); // 123