Regular Expressions 101

Community Patterns

MongoDB Object ID validation

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^[a-fA-F0-9]{24}$
/

Description

24 character hex string matching MongoDB Object ID format

Submitted by anonymous - 2 years ago