Regular Expressions 101

Spons⁠ors

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

/
^([1-9]{1}[0-9]{8}[VvXx])|([1-9]{1}[0-9]{11})$
/
gm

Description
Created·2022-07-26 07:01
Type·Match
Flavor·PCRE2 (PHP)

Sri Lankans have two types of identifiation numbers.

  1. National Identity Card number

  2. Sri Lanka Identity Number

  3. National Identity Card number

  • last two digits of the birth year
  • 3 digits for the number of days to birth date
  • number for the registration
  • V or X character
  1. Sri Lanka Identity Number
  • 4 digits of the birth year
  • 3 digits of number of days the to birth date
  • a single digit
  • number for the registration
Submitted by Isuru Ranawaka
Open Workspace