RE: [PHP] preg_match() occurence position

From: Date: Thu, 25 Jul 2002 11:51:32 +0000
Subject: RE: [PHP] preg_match() occurence position
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109477@lists.php.net to get a copy of this message
> Can I get the starting position of my string occurence when using any > regexps searching functions in PHP ? > > for example: > $mem='this is a test'; > preg_match('/test/', ...) should return me somehow: 10 Does it have to be a regular expression you are searching for? If not, you can use strpos(). www.php.net/strpos ---John Holmes...

« previous php.general (#109477) next »