Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^testing_v(?P<sm>[0-9\.]+([\-][0-9]+)?)?(\_[0-9A-Za-z-]+)?$
/
gm

Description

Example of regex for semver with pre-releases

Submitted by anonymous - 2 years ago