Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^\/([a-zA-Z\-]+\/)?(admin((\/[a-zA-Z0-9\-_&=?]*)*|$)|(user\/(login|password)(\/?\?[a-zA-Z0-9\-_&=]*|$)))$
/
gm

Description

Regular expression to match any Drupal admin route

Submitted by anonymous - 2 years ago