RE: listfunction problems
REReplace(list,,(\s*,)+,,,all) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 23 juni 2004 19:59 To: CF-Talk Subject: listfunction problems Hi folks, I have a list like: a, b, d, , f, g, , , , s But I would like to have: a, b, d, f, g, s How can I get rid of the empty elements in the list ? Uwe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
listfunction problems
Hi folks, I have a list like: a, b, d, , f, g, , , , s But I would like to have: a, b, d, f, g, s How can I get rid of the empty elements in the list ? Uwe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: listfunction problems
cfset a = arrayNew(1) / cfloop list=#myList# index=I cfif len(trim(i)) GT 0 cfset arrayAppend(a, i) / /cfif /cfloop cfset myList = listToArray(a) / That's untested, but should work. Cheers, barneyb -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 10:59 AM To: CF-Talk Subject: listfunction problems Hi folks, I have a list like: a, b, d, , f, g, , , , s But I would like to have: a, b, d, f, g, s How can I get rid of the empty elements in the list ? Uwe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: listfunction problems
http://www.cflib.org/udf.cfm?ID=919 should do the trick Marlon On Wed, 23 Jun 2004 19:58:45 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a list like: a, b, d, , f, g, , , , s But I would like to have: a, b, d, f, g, s How can I get rid of the empty elements in the list ? Uwe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: listfunction problems
On Wed, 23 Jun 2004 19:58:45 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I have a list like: a, b, d, , f, g, , , , s But I would like to have: a, b, d, f, g, s How can I get rid of the empty elements in the list ? How about replace all double commas? Kinda kludgy, but... replace(list,,all) -- Ubqtous [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: listfunction problems
On Wed, 23 Jun 2004 14:05:00 -0400, Ubqtous [EMAIL PROTECTED] wrote: replace(list,,all) Oops, wasn't paying attention. This won't catch more than 2 consecutive. This might work, assuming the elements are truly empty: rereplace( list , [,]{2,} , , , all) -- Ubqtous [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re[2]: listfunction problems
Hello Ubqtous, Wednesday, June 23, 2004, 8:12:49 PM, you wrote: On Wed, 23 Jun 2004 14:05:00 -0400, Ubqtous [EMAIL PROTECTED] wrote: Thanks. Nop, tried it but didn't work, Might be because of the elements aren't empty. I will give the UDF-function a try. Uwe -- Best regards, cf-talk mailto:[EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]