Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^784-?[0-9]{4}-?[0-9]{7}-?[0-9]{1}$
/
g

Description

Validate an Emirates ID number, with or without dashes.

Please note that this does not implement the Luhn Algorithm, which should be applied in conjunction with simple validation.

Submitted by Pete Mahon - 3 years ago