Global Identifiers
- United States
- Social Security Number - since 0.0.1
- Regex -
^(?!666|000|9\d{2})\d{3}-(?!00)\d{2}-(?!0{4})\d{4}$
- Example -
856-45-6789
- Regex -
- ZIP Code - since 0.0.1
- Regex -
^\d{5}(?:[-\s]\d{4})?$
- Example -
99750, 99750-0077, 99750 0077
- Regex -
- Social Security Number - since 0.0.1
- United Kingdom
- National Insurance number - since 0.0.1
- Regex -
^[A-CEGHJ-PR-TW-Z]{1}[A-CEGHJ-NPR-TW-Z]{1}[0-9]{6}[A-DFM]{0,1}$
- Example -
JG103759A, AP019283D, ZX047829C
- Regex -
- National Insurance number - since 0.0.1
Gradle
dependencies {
implementation("io.github.isharipov:globalids-us:0.0.1")
implementation("io.github.isharipov:globalids-uk:0.0.1")
}
Maven
<dependencies>
<dependency>
<groupId>io.github.isharipov</groupId>
<artifactId>globalids-us</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>io.github.isharipov</groupId>
<artifactId>globalids-uk</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
Requirements
Global Identifiers requires Java 1.8 or later.