Created
August 16, 2013 02:52
-
-
Save pabloprogramador/6246867 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Conteúdo a ser examinado | |
| $string = 'abcedf'; | |
| # Ocorrências | |
| preg_match('/[0-9]]/', $string); // Pode conter números de 0 à 9 | |
| preg_match('/[4-8]]/', $string); // Pode conter números de 4 à 8 | |
| preg_match('/[A-Z]]/', $string); // Pode conter letras de A à Z maiusculas | |
| preg_match('/[a-z]/', $string); // Pode conter letras de A à Z minusculas | |
| preg_match('/[F-P]]/', $string); // Pode conter letras de F à P maiusculas | |
| preg_match('/[f-p]]/', $string); // Pode conter letras de F à P minusculas | |
| preg_match('/[0-9A-Z]]/', $string); // Pode conter números de 0 à 9 e letras de de A à Z maiusculas | |
| preg_match('/[aeiou]]/', $string); // Pode conter vôgais |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment