[thelist] CF Question: Permutation of right(string, count)

Raymond Camden rcamden at allaire.com
Mon Jan 8 17:29:26 CST 2001


Yes, treat the string like a list. To get everything to the right of the
LAST comma, do:

<CFSET EndStuff = ListLast(Str)>

If STR is foo,bar,ray then this will return "ray". If you want everything
after the first comma, in this case "bar,ray", then simply do:

<CFSET EndStuff = ListDeleteAt(Str,1)>


=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Allaire

Email   : jedimaster at allaire.com
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Minh Lee Goon
> Sent: Monday, January 08, 2001 4:23 PM
> To: evolt
> Subject: [thelist] CF Question: Permutation of right(string, count)
>
>
> Dear evolta,
> I would like to retrieve only the characters to the right of a comma. I
> tried using the right(string, count) expression but the number of
> characters after the comma isn't always constant so I'm bound to get
> errors. For example, if my string is "foo,bar" I'd like to retrieve
> "bar" only.
>
> I was wondering if there's a quick and easy way of retrieving the
> characters to the right of a comma, instead of n number of characters
> from the right.
>
> TIA
>
> </ml>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list