Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^([0-9]{1,2})+[.]+([0-9]{1,2})+[.]+([0-9]{1,2})
/

Description

This validates version numbers that adhear to the Semantic protocol e.g. in form of xx.xx.xx or 1.2.2

Submitted by Al - 9 years ago