diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-07-16 20:53:18 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-07-16 20:53:18 +0200 |
commit | 53f186d96bc6dd3c5870201562116e17d008d64b (patch) | |
tree | 5a3c7950dc56995c495d6662a66a072bf4498913 /phpBB/includes/functions.php | |
parent | a53c8cee79af4fc76590073ae5913d8159b97679 (diff) | |
parent | 5216bf44838f8395d27b3df4ec1641a6407cb466 (diff) | |
download | forums-53f186d96bc6dd3c5870201562116e17d008d64b.tar forums-53f186d96bc6dd3c5870201562116e17d008d64b.tar.gz forums-53f186d96bc6dd3c5870201562116e17d008d64b.tar.bz2 forums-53f186d96bc6dd3c5870201562116e17d008d64b.tar.xz forums-53f186d96bc6dd3c5870201562116e17d008d64b.zip |
Merge branch 'prep-release-3.2.1' into 3.2.x
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3dabd1b46e..6c15c14300 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2815,6 +2815,11 @@ function get_preg_expression($mode) case 'path_remove_dot_trailing_slash': return '#^(?:(\.)?)+(?:(.+)?)+(?:([\\/\\\])$)#'; break; + + case 'semantic_version': + // Regular expression to match semantic versions by http://rgxdb.com/ + return '/(?<=^[Vv]|^)(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?<prerelease>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*)))*))?(?:[+](?<build>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+)))*))?)$/'; + break; } return ''; |