From: Tim Düsterhus Date: Mon, 9 Jan 2012 19:33:26 +0000 (+0100) Subject: Add two modifiers and fix analyse-modifier X-Git-Tag: 2.0.0_Beta_1~1433^2~15^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de3c3f7f0aab4aa74eeeb31ef8e67be7142ca084;p=GitHub%2FWoltLab%2FWCF.git Add two modifiers and fix analyse-modifier --- diff --git a/wcfsetup/install/files/lib/system/Regex.class.php b/wcfsetup/install/files/lib/system/Regex.class.php index f079ed49c8..848a3245f9 100644 --- a/wcfsetup/install/files/lib/system/Regex.class.php +++ b/wcfsetup/install/files/lib/system/Regex.class.php @@ -55,6 +55,20 @@ final class Regex { */ const NO_ANALYSE = 8; + /** + * Ignore whitepsace in regex. + * + * @var integer + */ + const IGNORE_WHITESPACE = 16; + + /** + * A dot matches every char. + * + * @var integer + */ + const DOT_ALL = 32; + /** * The compiled regex (:D) * @@ -86,7 +100,9 @@ final class Regex { if ($modifier & self::CASE_INSENSITIVE) $this->regex .= 'i'; if ($modifier & self::UNGREEDY) $this->regex .= 'U'; if ($modifier & self::EVAL_REPLACEMENT) $this->regex .= 'e'; - if (~$modifier & self::NO_ANALYSE) $this->regex .= 's'; + if (~$modifier & self::NO_ANALYSE) $this->regex .= 'S'; + if ($modifier & self::IGNORE_WHITESPACE) $this->regex .= 'x'; + if ($modifier & self::DOT_ALL) $this->regex .= 's'; } /**