Yes, I'm aware of the strpos() or any other non-regexp string functions...
but it is either I use regexp to match a certain pattern or I'll have to write a char-by-char parser to emulate regexp searching and yet get the position of the occurence! Thank you all anyway. //Elias "Alexander Kuznetsov" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello lallous, > > Thursday, July 25, 2002, 3:40:32 PM, you wrote: > > l> Hello, > > l> Can I get the starting position of my string occurence when using any > l> regexps searching functions in PHP ? > > l> for example: > l> $mem='this is a test'; > l> preg_match('/test/', ...) should return me somehow: 10 > > > l> Thanks > > > why regexps? > what about simple string fuctions in PHP? > > for your example they will be more usefull: > > strrpos - http://www.php.net/manual/en/function.strrpos.php > > sample: > > $text = "string"; > echo strrpos($text, "r"); // must show 2 as result > > > > -- > Best regards, > Alexander Kuznetsov > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php