Re: preg_match() occurence position

From: Date: Thu, 25 Jul 2002 11:46:41 +0000
Subject: Re: preg_match() occurence position
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109475@lists.php.net to get a copy of this message
On Thursday 25 July 2002 20:40, lallous wrote: > Hello, > > 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 No. If search string does not involve a regex then just use the plain string search functions. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* We will have solar energy as soon as the utility companies solve one technical problem -- how to run a sunbeam through a meter. */

« previous php.general (#109475) next »