diff --git a/cli/version_bump.php b/cli/version_bump.php
index ece23de..33f5775 100644
--- a/cli/version_bump.php
+++ b/cli/version_bump.php
@@ -31,7 +31,7 @@ $mokoManifest = "{$root}/.mokogitea/manifest.xml";
$mokoContent = '';
if (file_exists($mokoManifest)) {
$mokoContent = file_get_contents($mokoManifest);
- if (preg_match('|(\d{2}\.\d{2}\.\d{2})(?:-((?:(?:dev|alpha|beta|rc)-?)+))?|', $mokoContent, $m)) {
+ if (preg_match('#(\d{2}\.\d{2}\.\d{2})(?:-((?:(?:dev|alpha|beta|rc)-?)+))?#', $mokoContent, $m)) {
$mokoVersion = $m[1];
$mokoSuffix = isset($m[2]) ? $m[2] : '';
}
@@ -64,7 +64,7 @@ foreach ($manifestFiles as $xmlFile) {
if (strpos($xmlContent, '') === false) {
continue;
}
- if (preg_match('|(\d{2}\.\d{2}\.\d{2})((?:-(?:dev|alpha|beta|rc))+)?|', $xmlContent, $xm)) {
+ if (preg_match('#(\d{2}\.\d{2}\.\d{2})((?:-(?:dev|alpha|beta|rc))+)?#', $xmlContent, $xm)) {
$candidate = $xm[1];
if ($manifestVersion === null || version_compare($candidate, $manifestVersion, '>')) {
$manifestVersion = $candidate;
@@ -120,7 +120,7 @@ $newFull = $new;
// -- Update .mokogitea/manifest.xml (canonical — preserves suffix) --
if (file_exists($mokoManifest) && !empty($mokoContent)) {
$updated = preg_replace(
- '|\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?|',
+ '#\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?#',
"{$newFull}",
$mokoContent,
1
@@ -160,7 +160,7 @@ foreach ($xmlPatterns as $pattern) {
continue;
}
$newContent = preg_replace(
- '|\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?|',
+ '#\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?#',
"{$newFull}",
$content
);
diff --git a/cli/version_check.php b/cli/version_check.php
index ff4d538..0c49c64 100644
--- a/cli/version_check.php
+++ b/cli/version_check.php
@@ -59,7 +59,7 @@ foreach ($xmlGlobs as $glob) {
$xmlContent = file_get_contents($file);
if (strpos($xmlContent, '(\d{2}\.\d{2}\.\d{2})(?:(?:-(?:dev|alpha|beta|rc))+)?|', $xmlContent, $xm)) {
+ if (preg_match('#(\d{2}\.\d{2}\.\d{2})(?:(?:-(?:dev|alpha|beta|rc))+)?#', $xmlContent, $xm)) {
$relPath = str_replace($root . '/', '', $file);
$relPath = str_replace($root . '\\', '', $relPath);
$versions[$relPath] = $xm[1];
diff --git a/cli/version_read.php b/cli/version_read.php
index 5c76856..3324b36 100644
--- a/cli/version_read.php
+++ b/cli/version_read.php
@@ -66,7 +66,7 @@ foreach ($manifestFiles as $xmlFile) {
if (strpos($xmlContent, '') === false) {
continue;
}
- if (preg_match('|(\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?)|', $xmlContent, $xm)) {
+ if (preg_match('#(\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?)#', $xmlContent, $xm)) {
$candidate = $xm[1];
$candidateBase = preg_replace('/(-(dev|alpha|beta|rc))+$/', '', $candidate);
$currentBase = $manifestVersion ? preg_replace('/(-(dev|alpha|beta|rc))+$/', '', $manifestVersion) : null;
@@ -119,7 +119,7 @@ if ($version === null) {
// -- Backfill: if manifest.xml exists but lacks , insert it --
if (file_exists($mokoManifest)) {
$content = file_get_contents($mokoManifest);
- if (!preg_match('|\d{2}\.\d{2}\.\d{2}((?:-(?:dev|alpha|beta|rc))+)?|', $content)) {
+ if (!preg_match('#\d{2}\.\d{2}\.\d{2}((?:-(?:dev|alpha|beta|rc))+)?#', $content)) {
if (strpos($content, '