Re: [PHP] String searching

2008-05-17 Thread Richard Heyes
Chris W wrote: I need to find the position of the first character in the string (searching from the end) that is not one of the characters in a set. In this case the set is [0-9a-zA-z-_] I guess to be even more specific, I want to split a string into to parts the first part can contain anything

Re: [PHP] String searching

2008-05-16 Thread Daniel Brown
On Sat, May 17, 2008 at 2:17 AM, Chris W <[EMAIL PROTECTED]> wrote: > I need to find the position of the first character in the string > (searching from the end) that is not one of the characters in a set. In > this case the set is [0-9a-zA-z-_] To find the position of a specific character, R

Re: [PHP] String searching peformance

2003-02-26 Thread {R}ichard Ashton
On Wed, 26 Feb 2003 17:47:41 +0800, Jason Wong wrote: >On Wednesday 26 February 2003 16:49, {R}ichard Ashton wrote: > >> Do you think that: >> >> if (preg_match($re, $posting, $hits)) would slow it down at all. The >> $buzzwords will be kept in a file to be loaded before each run, every 5 >> minute

Re: [PHP] String searching peformance

2003-02-26 Thread Jason Wong
On Wednesday 26 February 2003 16:49, {R}ichard Ashton wrote: > Do you think that: > > if (preg_match($re, $posting, $hits)) would slow it down at all. The > $buzzwords will be kept in a file to be loaded before each run, every 5 > minutes. I could therefore keep a count of which words hit most > f

Re: [PHP] String searching peformance

2003-02-26 Thread Ernest E Vogelsinger
At 09:49 26.02.2003, {R}ichard Ashton said: [snip] >Do you think that: > >if (preg_match($re, $posting, $hits)) would slow it down at all. The >$buzzwords will be kept in a file to be loaded before each run, every 5 >minutes. I could therefore keep a count of

Re: [PHP] String searching peformance

2003-02-26 Thread {R}ichard Ashton
On Mon, 24 Feb 2003 22:35:35 +0100, Ernest E Vogelsinger wrote: >At 21:22 24.02.2003, {R}ichard Ashton spoke out and said: >[snip] >>while ( $flag == true ) >>if (strpos($body, $word[]) > 0) {$flag=false} >> >>What I really need to know is which is the faste

Re: [PHP] String searching peformance

2003-02-24 Thread Ernest E Vogelsinger
At 21:22 24.02.2003, {R}ichard Ashton spoke out and said: [snip] >while ( $flag == true ) >if (strpos($body, $word[]) > 0) {$flag=false} > >What I really need to know is which is the fastest loop? >Which is the fastest match, strpos? >Which is the fastest com