Regular Expressions 101

Community Patterns

Version Matcher

4

Regular Expression
PCRE (PHP <7.3)

/
^v(\d+\.)?(\d+\.)?(\*|\d+)$
/

Description

Matches version strings.

Submitted by anmols - 8 years ago