note 74641 deleted from function.preg-match by nlopess

From: Date: Tue, 01 May 2007 13:38:49 +0000
Subject: note 74641 deleted from function.preg-match by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126039@lists.php.net to get a copy of this message
Note Submitter: robert at kajic dot com ---- legolas558, Your solution changes the whole meaning of the regular expression. By adding the question mark the regex will only match the first occurrence in the subject. While that may be desirable in some situations in others it may be necessary to make sure the regex will match the whole subject, not just the smallest possible part. If this is the case one can't simply make the expression lazy with the use of a question mark. The point is, your workaround isn't really a workaround as the regexp with the question mark isn't equivalent to the one without. What we need is a fix to this bug.

« previous php.notes (#126039) next »