Re: find string position using reg exp
| From: | Richard Davey | Date: | Mon, 29 Mar 2004 15:42:55 +0000 |
| Subject: | Re: find string position using reg exp | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181670@lists.php.net to get a copy of this message | ||
Hello Christian,
Monday, March 29, 2004, 10:28:53 AM, you wrote:
CC> maby I am missing something, but I am trying to find a way to find the N
CC> position/character in a String of a regular expression match. For example,
CC> if I look for the pattern "abba" in 200 character length string, I would
CC> like to know where, at what position that match was made. Any ideas? Thanks
Why use a regular expression?
strpos() will do this just fine.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html