Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing non-alphanumeric characters

638288May 22 2008 — edited Dec 1 2011
Hello,
New to Oracle (not so new to SQL) and this is my first post ... please be kind :-)

Anyway, I have a variable length string that I would like to separate into separate rows/columns. the structure is as follows:

|G^7130^R|C^7130^R|G^7131^R|C^7131^R|G^9900^R|C^9950^R|C^9951^R

... the leading alpha following the pipe is required in a column as is the numeric that follow. I have tried ...

REGEXP_REPLACE(string, '[^[:digit:]]',',') which gave me ...

,,,7130,,,,,7130,,,,,7131,,,,,7131,,,,,9900,,,,,9950,,,,,9951,,

..wrong...

I am trying to produce ..

code value
G 7130
C 7130

etc

Anyway any help would be appreciated .... and yes I am going through the literature as fast as I can ... well at least as fast as I can comprehend.

Thanks.

A
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2011
Added on May 22 2008
6 comments
4,236 views