Re: REGEXP_SUBSTR

From: <mrdjmagnet_at_aol.com>
Date: Wed, 28 Jan 2009 09:41:08 -0800 (PST)
Message-ID: <8c2e005a-c29d-4b0f-b25c-1b9964a57264_at_r10g2000prf.googlegroups.com>



On Jan 28, 11:03 am, mrdjmag..._at_aol.com wrote:
> I'm working on this now but figured I'd cheat at the same time and see
> if someone else can help.
>
> I have a text pattern:   "M, MO" or "M,MO" or "HELO","M,MO"
>
> I am looking to extract the "M,MO" pattern.  First I remove the space
> after the comma:
>
> v_fld := REPLACE(v_fld,', ',',');
>
> But now I'm having trouble getting the pattern out. Here are some
> attempts:
>
> SELECT REGEXP_SUBSTR('"M, MO"','"*,*"') FROM dual;
> SELECT REGEXP_SUBSTR('"M, MO"','"([[:alnum:]],[[:alnum:]])"') FROM
> dual;
>
> No luck yet.

This did not work either:

SELECT regexp_substr( '"M, MO","FSDFS"', '"[^,].+' ) "REGEXP_SUBSTR" FROM dual; Received on Wed Jan 28 2009 - 11:41:08 CST

Original text of this message