Thanks everyone for the quick help.
The listfirst, listlast functions worked great.

Thanks, Mark

  _____  

From: Mark W. Breneman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 3:46 PM
To: CF-Talk
Subject: RE: Splitting two word string

Try looking at this as two items in a list and the list delimited by a
space. listfirst and listlast should do what you need.

VARIABLE.firstword = listfirst(db_field, ' ')
VARIABLE.secondword =  listLast(db_field, ' ')

Mark W. Breneman
-Cold Fusion Developer
-Network Administrator
  Vivid Media
  [EMAIL PROTECTED]
  www.vividmedia.com <http://www.vividmedia.com/>
  608.270.9770

  _____  

From: Mark Leder [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 2:38 PM
To: CF-Talk
Subject: Splitting two word string

Hi all,

I have a string returned from a db field, such as "my dog" (these strings
will be different two word combinations, each word of different lengths -
which to me rules out the use of Left() and Right().

How would I take "my dog" and break it apart so that I can return two new
vars,

VARIABLE.firstword =
VARIABLE.secondword =

I've poked around on CFLib without much success.

Thanks, Mark
  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to