Regular Expressions 101

Community Patterns

MongoDB _ID

1

Regular Expression
PCRE (PHP <7.3)

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

Description

Detect if is a valid id for MongoDB

Submitted by manuerumx - 10 years ago