Copy regular expressions to a single click

Regular expression of Ukrainian passport

Regular expressions and life hacks for control and monitoring of the Ukrainian passport in the DLP system.

passport_Ukraine_icon

The information contained within the passport included the holder’s:

  • Surname
  • Forename(s)
  • Patronymic name
  • Date and place of birth
  • A photograph and signature of the holder
  • Name of the person’s spouse (if married)
  • Names of any dependent children (younger than 16 years)
  • Eligibility for military service
  • Registered address

# RegEx

(?:^|\s)[А-Я]{2}([ ]?){1}\d{6}(?:$|\s|\,)

(?:^|\s) – start of string (with a new line or space)
[А-Я]{2} – large letters of the alphabet of the Ukrainian language
([ ]?){1} – may have one space
\d{6} – six digits
(?:$|\s|\,) – end of string (line end, space or comma)

OR

# RegEx

(?:^|\s)[\x{0410}\x{0411}\x{0412}\x{0413}\x{0414}\x{0415}\x{0416}\x{0417}\x{0418}\x{0419}\x{041A}\x{041B}\x{041C}\x{041D}\x{041E}\x{041F}\x{0420}\x{0421}\x{0422}\x{0423}\x{0424}\x{0425}\x{0426}\x{0427}\x{0428}\x{0429}\x{042C}\x{042E}\x{042F}\x{0404}\x{0406}\x{0407}\x{0490}]{2}(\s{1})?\d{6}(?:$|\s|\,)

(?:^|\s) – start of string (with a new line or space)
[\x{0410}\x...]{2} – large letters of the Ukrainian alphabet in unicode
([ ]?){1} – may have one space
\d{6} – six digits
(?:$|\s|\,) – end of string (line end, space or comma)

Example:
АМ684579 and КЛ 457216

Ukrainian identity card (ID Card)

The current Ukrainian identity card takes the form of a credit card sized plastic card with an integrated contactless microchip on which personal data is held. The top of the card bears the coat of arms of Ukraine, the name of the country – Ukraine, and the words ‘Passport of the Citizen of Ukraine’ in both Ukrainian and English. The flag of Ukraine appears in the top right corner of the card, whilst the international symbol for biometric documents can be found in the top left corner.

The front of the card bears a black and white laser embossed image of the holder, their signature and the following key personal details in both Ukrainian and English:

  • Surname
  • First name(s)
  • Patronymic (in Ukrainian only)
  • Sex
  • Date of Birth
  • Nationality (УКРАЇНА/UKR)
  • Record No.
  • Document No.
  • Expiry date
  • Taxpayer No.

The reverse of the card bears the following pieces of information:

  • Date of issue
  • Authority
  • Place of birth

# RegEx

^IDUKR\d{23}<<\n?\d{7}[A-Z]{1}\d{7}UKR<{11}\d{1}\n?[A-Z]+<<[A-Z]+<{12}$

Example:
IDUKR00000000001991082400026<<
9108242F2512130UKR<<<<<<<<<<<2
TKACHENKO<<MARIANA<<<<<<<<<<<<


Or merge (without line transfer):

# RegEx

^IDUKR\d{23}<<\d{7}[A-Z]{1}\d{7}UKR<{11}\d{1}[A-Z]+<<[A-Z]+<{12}$

Example:
IDUKR00000000001991082400026<<
9108242F2512130UKR<<<<<<<<<<<2
TKACHENKO<<MARIANA<<<<<<<<<<<<

# RegEx

^(Україна\/UKR)\n(\d{8}-\d{5})\n\d{9}$

Example:
Україна/UKR
19910824-00026
000000000