Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

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

Description

Given example text in 0.6.12+commit.27d51765. Now we need to extract the version number from the text.

Submitted by jjhesk - 3 years ago