Adjust whitespace token in regexes

This commit is contained in:
Steffen Lange 2021-01-21 15:56:30 +01:00
parent 73c8b806d7
commit 22646555c9
8 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,7 @@ class ClonezillaAlternative extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://clonezilla.org/downloads.php')) if ($this->fetch('https://clonezilla.org/downloads.php'))
return $this->parse('/<b>alternative stable<\/b>[\s]*-[\s]*<font color=red>([\d]+-[a-z]+)/'); return $this->parse('/<b>alternative stable<\/b>\s*-\s*<font color=red>([\d]+-[a-z]+)/');
return false; return false;
} }
} }

View file

@ -7,7 +7,7 @@ class ClonezillaStable extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://clonezilla.org/downloads.php')) if ($this->fetch('https://clonezilla.org/downloads.php'))
return $this->parse('/<b>stable<\/b>[\s]*-[\s]*<font color=red>([\d\.-]+)/'); return $this->parse('/<b>stable<\/b>\s*-\s*<font color=red>([\d\.-]+)/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class CrossOver extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.codeweavers.com/products/more-information/changelog')) if ($this->fetch('https://www.codeweavers.com/products/more-information/changelog'))
return $this->parse('/<b>([\d\.]+)<\/b>[\s]*CrossOver/'); return $this->parse('/<b>([\d\.]+)<\/b>\s*CrossOver/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class DOSBox extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.dosbox.com/download.php?main=1')) if ($this->fetch('https://www.dosbox.com/download.php?main=1'))
return $this->parse('/Latest version:\s+<a class="bold" href="download\.php\?main=1">([\d\.-]+)<\/a>/'); return $this->parse('/Latest version:\s*<a class="bold" href="download\.php\?main=1">([\d\.-]+)<\/a>/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class Krita extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://krita.org/en/download/krita-desktop/')) if ($this->fetch('https://krita.org/en/download/krita-desktop/'))
return $this->parse('/<h3>Download Krita[\s]*([\d\.]+)<\/h3>/'); return $this->parse('/<h3>Download Krita\s+([\d\.]+)<\/h3>/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class PDF24 extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://en.pdf24.org/')) if ($this->fetch('https://en.pdf24.org/'))
return $this->parse('/<span>PDF24 Creator<\/span>[\s]*<span>([\d\.]+)<\/span>/'); return $this->parse('/<span>PDF24 Creator<\/span>\s*<span>([\d\.]+)<\/span>/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class PHP extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.php.net/downloads.php')) if ($this->fetch('https://www.php.net/downloads.php'))
return $this->parse('/Current Stable<\/span>[\s]*PHP ([\d\.]+)/'); return $this->parse('/Current Stable<\/span>\s*PHP ([\d\.]+)/');
return false; return false;
} }
} }

View file

@ -6,7 +6,7 @@ class TeamViewer extends PatchBase {
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.teamviewer.com/en/download/windows/')) if ($this->fetch('https://www.teamviewer.com/en/download/windows/'))
return $this->parse('/<div class="wpb_wrapper">[\s]*([\d\.]+)/'); return $this->parse('/<div class="wpb_wrapper">\s*([\d\.]+)/');
return false; return false;
} }
} }