note 44002 rejected from function.strpos by betz

From: Date: Mon, 12 Jul 2004 08:59:49 +0000
Subject: note 44002 rejected from function.strpos by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73086@lists.php.net to get a copy of this message
Note Submitter: nikon@lochkarte.org ---- i've got a little problem using strpos() when i try to find a needle beginning with and space, the function ignores thats space, like it makes internally an trim() onto the needly string. for example: $lsText = "i search for http:// and <a href="http://bla"> should be ignored"; $lsNeedle = " http://"; // leeding whitespace $liPos1 = strpos( $lsText, $lsNeedle ); $liPos2 = strpos( $lsText, $lsNeedle, $liPos1 ); in that case the $liPos2 shows me the beginning of the second http:// inside of the <a href tag. but that is not the thing i would like this method to do :) anyone an hint?

« previous php.notes (#73086) next »