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

Raymond Camden rcamden at allaire.com
Mon Jan 8 19:35:26 CST 2001

```InStr would be Find.

=======================================================================
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-----
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Scott Dexter
> Sent: Monday, January 08, 2001 5:32 PM
> To: 'thelist at lists.evolt.org'
> Subject: RE: [thelist] CF Question: Permutation of right(string, count)
>
>
> there are a couple techniques I've done:
>
> 1) split the string into an array, using the comma as the delimiter, then
> grab the last item in the array
>
> 2) strAfterComma = substring(InStr(",",strInput),Len(strInput))
>
> 3) strAfterComma = right(InStr(",",strInput),
> Len(strInput)-InStr(",",strInput))
>
> (not sure if InStr is a CF function, it returns the position of the comma,
> check your documentation, some InStr-like functions return the first
> occurence, some return the last)
>
> make sense?
> sgd
> --
> work: http://www.ti3.com/
> non: http://thinksafely.org/
>
> > -----Original Message-----
> > From: Minh Lee Goon [mailto:v7ac at sdsumus.sdstate.edu]
>
> > 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.
> >
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !

```