Regular Expressions 101

Community Patterns

Major.Minor.Patch Regex

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(\d+\.)(\d+\.)(\*|\d+)$
/
gm

Description

This regex will only allow the Major.Minor.Patch pattern to pass.

Submitted by Rónmag - 10 months ago