have more than one word in a last name. Or what if hey put their last
name first?
This said
Lastname = REReplace(form.name,"^.*[[:space:]]","") OR
LastName = ListLast(form.name," ")
> -----Original Message-----
> From: Michael Kear [mailto:[EMAIL PROTECTED]
> Sent: maandag 14 juni 2004 7:36
> To: CF-Talk
> Subject: Help with string manipulation please
>
> I'm trying to work out how to process a form input .
>
>
>
> One of the fields on the form is "name" and I need to split
> the contents
> into "firstname" and "lastname". I realise that some people
> might have two
> spaces in the name if they choose to enter two firstnames or
> if they have a name like Jerry Van Morrison so I want to
> strip off the characters
> remaining after the last space and call that "lastname".
> (If they don't
> have any spaces in their input I'm going to consider the
> whole thing to be their firstname.)
>
>
>
> I've tried quite a few different combinations of find() and
> replace() and
> mid() but I'm afraid my brain is obviously not going into gear. Can
> someone help me please? How do I split "form.name" into
> "firstname" and "lastname". (I've already looked at
> CFLIB.ORG and can't see anything there that'll do this.
>
>
>
> Cheers
>
> Mike Kear
>
> Windsor, NSW, Australia
>
> AFP Webworks
>
> http://afpwebworks.com
>
>
>
>
>
>
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

