Regular Expressions 101

Library entries

Parse drupal version info from filename

Vote

1

Regular Expression
pcre

/
^(?<project>\w+)-(?<core>\d+\.x)-(?<major>\d+)\.(?<patch>[\dx]+)[-\.]?(?<extra>[^\.]+)?\.(tar\.gz|tgz)$
/
mg

Description

Loading markdown...
Submitted by Jason Smith - 8 years ago