Re: regexp_substr help, please

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 29 Apr 2008 09:43:23 -0800
Message-ID: <4817502b$1@news.victoria.tc.ca>


Doug Miller (spambait_at_milmac.com) wrote:
: I need to be able to pull just the last name out of a string consisting of
: lastname and firstname, separated by a comma, or space, or comma and space.
: Complicating matters somewhat is the fact that lastname might be something
: like "Mc Kay" or "St. Louis" so simply grabbing everything before the first
: space isn't sufficient.

: The closest I've come so far is
: select regexp_substr ('St. Louis, Ted', '.{4}[A-Z]+') from dual;
: but this returns only
: St. L

[A-Z] doesn't match o Received on Tue Apr 29 2008 - 12:43:23 CDT

Original text of this message