Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: String Manipulation

Re: String Manipulation

From: Jared Still <jkstill_at_gmail.com>
Date: Thu, 17 May 2007 16:34:02 -0700
Message-ID: <bf46380705171634x9e91587j8580b64961f58480@mail.gmail.com>


On 5/17/07, Jeremiah Wilton <jeremiah_at_ora-600.net> wrote:
>
> A regex returning the first word from the address should do it:
>
> SQL> select regexp_substr('foo.bar.baz','\w*') from dual;
>
>
>

16:32:27 SQL>l
  1* select regexp_substr('foo-1.bar.baz','[a-z|A-Z|0-9|-]*') from dual 16:32:28 SQL>/ REGEX



foo-1

1 row selected.

There's probably a metacharacter to shorten that regex, but I can't remember and too lazy to look.

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 17 2007 - 18:34:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US