Skip to content

Commit 68e351c

Browse files
committed
Improve regex
1 parent 2191bc2 commit 68e351c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

buildconf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ debug=0
99
# Go to project root.
1010
cd $(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
1111

12-
php_extra_version=$(grep '^AC_INIT(\[' configure.ac)
12+
php_extra_version=$(grep '^AC_INIT(' configure.ac)
1313
case "$php_extra_version" in
1414
*-dev*)
1515
dev=1

win32/build/confutils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var PHP_VERSION_STRING = "7.3.0";
105105
function get_version_numbers()
106106
{
107107
var cin = file_get_contents("configure.ac");
108-
var regex = /AC_INIT\(\[PHP\],\[(\d+)\.(\d+)\.(\d+)([^\]]*)\],.+\)/g;
108+
var regex = /AC_INIT.+(\d+)\.(\d+)\.(\d+)([^\,^\]]*).+/g;
109109

110110
if (cin.match(new RegExp(regex))) {
111111
PHP_VERSION = RegExp.$1;

0 commit comments

Comments
 (0)