svn: /web/qa/trunk/include/ functions.php
| From: | Felipe Pena | Date: | Fri, 24 Jun 2011 22:27:57 +0000 |
| Subject: | svn: /web/qa/trunk/include/ functions.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65844@lists.php.net to get a copy of this message | ||
felipe Fri, 24 Jun 2011 22:27:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312446
Log:
- Improved version check regex
Changed paths:
U web/qa/trunk/include/functions.php
Modified: web/qa/trunk/include/functions.php
===================================================================
--- web/qa/trunk/include/functions.php 2011-06-24 22:27:27 UTC (rev 312445)
+++ web/qa/trunk/include/functions.php 2011-06-24 22:27:57 UTC (rev 312446)
@@ -169,8 +169,7 @@
return true;
}
- //@todo Add alpha/beta/RC for regex...
- if (preg_match('@^[0-9]{1}\.[0-9]{1}\.[0-9\.\-dev]{1,}$@', $version)) {
+ if (preg_match('@^\d{1}\.\d{1}\.\d{1,}(?:(?:RC|alpha|beta)\d{0,2})?(?:-dev)?$@i',
$version)) {
return true;
}