Re: [PHP] Good Regex for general text search

2007-10-02 Thread Chris
Amos Vryhof wrote: Ok, My example was pretty bad. I was just looking for an easier/more optimal way to look for something along the lines of "word1*word2*word3*word4" rather than "word1 word2 word3 word4" as it currently does. Actually, I think I have an idea for a way to do what I want without

Re: [PHP] Good Regex for general text search

2007-10-02 Thread Amos Vryhof
Ok, My example was pretty bad. I was just looking for an easier/more optimal way to look for something along the lines of "word1*word2*word3*word4" rather than "word1 word2 word3 word4" as it currently does. Actually, I think I have an idea for a way to do what I want without a regular expression

Re: [PHP] Good Regex for general text search

2007-10-02 Thread Chris
Amos Vryhof wrote: I'm writing a few very simple search scripts. One searches in a few columns of a CSV file, while another just searches through a collection of file names. Currently, I just have it stripping illegal characters from the "needle" and "haystack" then doing a substring search

[PHP] Good Regex for general text search

2007-10-02 Thread Amos Vryhof
I'm writing a few very simple search scripts. One searches in a few columns of a CSV file, while another just searches through a collection of file names. Currently, I just have it stripping illegal characters from the "needle" and "haystack" then doing a substring search if (substr_count(.