Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

regex cpf

// CPF
/^d{3}.d{3}.d{3}-d{2}$/

// Para CNPJ
/^d{2}.d{3}.d{3}/d{4}-d{2}$/

// Para ambos ao mesmo tempo
/(^d{3}.d{3}.d{3}-d{2}$)|(^d{2}.d{3}.d{3}/d{4}-d{2}$)/
Comment

cpf regex

([0-9]{2}[.]?[0-9]{3}[.]?[0-9]{3}[/]?[0-9]{4}[-]?[0-9]{2})|([0-9]{3}[.]?[0-9]{3}[.]?[0-9]{3}[-]?[0-9]{2})
Comment

PREVIOUS NEXT
Code Example
Javascript :: open ilnk target js 
Javascript :: jquery get current url 
Javascript :: javascript radian to degree 
Javascript :: get only last 2 digit of year in javascript 
Javascript :: js random hex color 
Javascript :: jquery link cdn 
Javascript :: JavaScript that executes after page load 
Javascript :: js replace space with underscore 
Javascript :: check if string only contains integer digits numbers javascript 
Javascript :: check if a variable is undefined jquery 
Javascript :: jquery slim min js url 
Javascript :: React version on CMD 
Javascript :: 2x speed youtube 
Javascript :: ruby read json file 
Javascript :: get current url js 
Javascript :: regex check if number is even 
Javascript :: scroll to element jquery 
Javascript :: how to get the selected text of dropdown in jquery 
Javascript :: textinput disable react native 
Javascript :: html include js file flask 
Javascript :: google dino hack 
Javascript :: enable/disable textbox on checkbox click using jquery 
Javascript :: react navigation no header 
Javascript :: jquery check if checkbox is checked 
Javascript :: how to edit the visibiility of an element javscript 
Javascript :: eas generate apk 
Javascript :: add 1 day to date js 
Javascript :: history back js 
Javascript :: react native run ipad 
Javascript :: javascript get element height 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =