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

Joshua OIson joshua at alphashop.net
Mon Jan 8 17:41:26 CST 2001

If there is exactly one comma in the string, you can use


-or if there could be many commas and you want what's after the first comma-

ListGetAt(string, 2)

-or if there could be multiple commas and you want everything after the
first comma the following 2 will work-

Right(string, Len(string) - Find(',', string))
Reverse(Left(string, Find(',', Reverse(string))-1))

Keep in mind that ListGetAt(string, 2) will fail if the first element is
empty and therefore the comma is the first character in the string and there
is one comma in the string.


----- Original Message -----
From: "Minh Lee Goon" <v7ac at sdsumus.sdstate.edu>
To: "evolt" <thelist at lists.evolt.org>
Sent: Monday, January 08, 2001 1:23 PM
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.
> </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