Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
(?:0[xX])?[0-9a-fA-F]+
/

Description

check if a string is a hex number

Submitted by anonymous - 9 years ago