You could do this with a regex but it would be easier and more efficient 
to do it with listfind() using a space as the delimiter.

--Ben Doom

Mark Henderson wrote:
> Hi
>  
> I have a search box that currently contains only one field. I normally
> have one input for first name, one for lat name and so on, which makes
> the task of searching somewhat easier. However, in this scenario that is
> not the case. So, what I want to do is split the search term entered
> into distinct variables.
>  
> An example - let's say someone enters "joe blogs" in the search field
> (without quotes). I then want to be able to parse it so that I have one
> variable for "joe" and another for "blogs", which I can then search on
> since the database is organised into first_name, last_name, maiden_name,
> email, etc. The criteria for this will be the space between the names.
> This looks like a case for regular expressions. I know how to use REFind
> to check for the space, but that's all so far (I've spent some time on
> this, and even read the docs!). Can someone help me here please? 
>  
> TIA
> 
> Regards
> 
> Mark Henderson
> Web Designer
> mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
> 
> 205 Main Street
> PO Box 143, Gore
> Southland 9700
> Phone: (03) 203 9999
> Fax: (03) 203 9900
> 
> 
> 
>   <http://www.cwc.co.nz>  
>   <http://www.ispnz.co.nz> 
>   <http://www.nzfarming.co.nz> 
> 
> http://www.cwc.co.nz <http://www.cwc.co.nz> 
> http://www.ispnz.co.nz <http://www.ispnz.co.nz> 
> http://www.nzfarming.co.nz <http://www.nzfarming.co.nz>  
> 
> 
> 
> Notice of Confidential Information: The information contained in this
> electronic mail is CONFIDENTIAL INFORMATION and may be LEGALLY
> PRIVILEGED, intended only for the individual or entity named above. If
> you are not the intended recipient, you are hereby notified that the
> use, dissemination, distribution, or copying of this document is
> strictly prohibited. If you have received this electronic message in
> error, please immediately notify us by return or telephone (0064 3 203
> 9999) and destroy the original message. Thank you. 
> 
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284631
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to