Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^[0-9]*(\.[0-9]*)*?(-[^\s]*)?$
/

Description

Verify if the given text is a version tag, like git tags for versions in the git flow method

Submitted by bruno-delfino1995 - 8 years ago