My brother's name is Justin William Eugene Mckinney III. That might throw you for a loop. It will really throw you for a loop when it is "Justin William Eugene Mckinney III PHD" Or "Dr. Justin William Eugene Mckinney III"
Simply taking listfirst() and listlast() delimited by a space won't always give you the result you want... but when it IS a good idea... you just do... <cfset firstname = listfirst(name, " ") /> <cfset lastname = listlast(name, " ") /> ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: Mark Henderson [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 25, 2007 6:19 PM To: CF-Talk Subject: Regex help with search strings 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. -- This message has been scanned for viruses and dangerous content by ISPNZ's automated virus detection system, and is believed to be clean. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284682 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

