Skip to content

Instantly share code, notes, and snippets.

@ademar111190
Created June 26, 2014 21:25
Show Gist options
  • Save ademar111190/453d5a7a4e75e7e5933f to your computer and use it in GitHub Desktop.
Save ademar111190/453d5a7a4e75e7e5933f to your computer and use it in GitHub Desktop.
Android & Java brazilian CPF and CEP pattern
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