Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: return first token/word from string?
Brian Peasland wrote:
> jobs wrote:
>> On Aug 22, 3:31 pm, DA Morgan <damor..._at_psoug.org> wrote: >>> jobs wrote: >>>> I'm on Oracle 9i. Is there any built in function that would return the >>>> first token or string from a string? >>>> For example, given string = " bob lfcr bill" >>>> I want to return "bob" >>>> imediately following bob there might be cases where we have a linefeed/ >>>> cr. >>>> Thanks for any help or information. >>> Look at REGEXP_SUBSTRhttp://www.psoug.org/reference/regexp.html#rerp >>> -- >>> Daniel A. Morgan >>> University of Washington >>> damor..._at_x.washington.edu (replace x with u to respond) >>> Puget Sound Oracle Users Groupwww.psoug.org >> >> Is that supported in 9i? I can't seem to get it to work here. >>
It has been so long since I've seen 9i I forgot about that.
Well there is always the OWA_PATTERN built-in package but it runs at a speed that is glacial compared with REGEXP. Still it is an option.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Aug 22 2007 - 15:29:40 CDT