Regular Expressions 101

Community Patterns

Community Library Entry

13

Regular Expression
PCRE (PHP <7.3)

/
^https?:\/\/regex101\.com\/?(?:r\/(?P<link>(?:[a-zA-Z]{2}\d){2})(?:\/(?P<version>\d+)?)?)?$
/
gm

Description

grabs the ID for the regex101.com permalink to code

Submitted by chris mccoy - 10 years ago