Search string parsing
From: flam (google_at_netlam.com)
Date: 03/19/04
- Next message: Gunnar Hjalmarsson: "Re: Search string parsing"
- Previous message: Gunnar Hjalmarsson: "Re: Regular Expression Help"
- Next in thread: Gunnar Hjalmarsson: "Re: Search string parsing"
- Reply: Gunnar Hjalmarsson: "Re: Search string parsing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Mar 2004 14:09:00 -0800
Hello,
I am having a hard time spliting a string into an array for use in a
search. Here is the situation. The user will input a search string.
Normally I can just split the string by "split /\s+/, $string".
However, I want to allow the user to put words so they appear and are
searched together ie. "search this" would be searched as one term and
not "search" and then somewhere else "this", etc. So if a user enters
something like this:
how do I "search this" and split
How do I split this into an array of:
how
do
I
search this
and
split
Thanks
Fritz
- Next message: Gunnar Hjalmarsson: "Re: Search string parsing"
- Previous message: Gunnar Hjalmarsson: "Re: Regular Expression Help"
- Next in thread: Gunnar Hjalmarsson: "Re: Search string parsing"
- Reply: Gunnar Hjalmarsson: "Re: Search string parsing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|