Regular Expressions 101

Community Patterns

Simple EIN (Employee Identification Number) format

1

Regular Expression
ECMAScript (JavaScript)

/
^\d{2}-\d{7}$
/
gm

Description

An Employer Identification Number (EIN) is also known as a Federal Tax Identification Number, and is used to identify a business entity. Generally, businesses need an EIN.

It expects 2 digits at start, then a dash ('-') and then 7 digits. No assumptions regarding the allowed prefixes, etc.

Submitted by @uazure - 20 days ago