|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-17 20:45 UTC] mjs at beebo dot org
[2009-06-17 22:58 UTC] felipe@php.net
[2009-06-17 23:04 UTC] mjs at beebo dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
Description: ------------ The regular expression /\Q$z\E/ matches (as far as I can tell) every string. It certainly matches some strings it shouldn't match: preg_match("/\Q$z\E/", "") -> MATCH (WRONG!) preg_match("/\Q$z\E/", "qqqq") -> MATCH (WRONG!) preg_match("/\Q $z\E/", "qqqq") -> NO MATCH (CORRECT) preg_match("/\Q $z\E/", " $z") -> MATCH (CORRECT) preg_match("/\Q\$z\E/", "\$z") -> MATCH (CORRECT) preg_match("/\Q\$z\E/", "$z") -> NO MATCH (CORRECT) The problem seems to occur if the regular expression begins with the string "\Q$" followed by at least one character.