Created
June 26, 2014 21:25
-
-
Save ademar111190/453d5a7a4e75e7e5933f to your computer and use it in GitHub Desktop.
Android & Java brazilian CPF and CEP pattern
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
import java.util.regex.Pattern; | |
public static final Pattern CPF = Pattern.compile("^([0-9]{3}\\.?){3}-?[0-9]{2}$"); | |
public static final Pattern CEP = Pattern.compile("[0-9]{5}-?[0-9]{3}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment