Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
ECMAScript (JavaScript)

/
^(.?)(.?)(.?)(.?)(.?).?\5\4\3\2\1$
/

Description

Captures a palindrome of 9 digits or less

Submitted by anonymous - 8 years ago