Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-03-11 16:16
Flavor·PCRE2 (PHP)

/
^(x|y).*\1$
/
gm
Open regex in editor

Description

This will match all strings starting and ending with the same letters that are specified in the capturing group (in the parentheses).

Submitted by @elliottprogrammer