RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(\d{3}.?\d{3}.?\d{3}-?\d{2})
Description
Brazilian CPF - Personal document in Brazil.
Matches
000.000.000-00 | 00000000000
Non-Matches
0000.00.000-00 | 0000000
Author Rating: Not yet rated. Rogerio Pereira
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Big error.
Name: Julio Santos Monteiro
Date: 11/11/2006 4:36:20 PM
Comment:
You have here: it accepts ANY character in the place of dot (.). Example: 000a000a000-00


Title: . -> \.
Name: Jakub Skopal
Date: 10/2/2003 3:47:16 AM
Comment:
What you really wanted to write was: (\d{3}\.?\d{3}\.?\d{3}-?\d{2}) if you have explicitly dots in your personal document number. Otherwise "00000000000-00" would match as would for example "000~000ž000-000". Jakub


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials