Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> help with regexp_substr using Oracle XE with Windows XP Home
Hello - this is my first post to this professional newsgroup. If this is the wrong newsgroup please e-mail me and not flame me if I maked a mistake.
In Oracle what I want from my sql is the following results.
first second third fourth ------ ---------- -------------- --------- first second third word fourth.
What I have written is
SELECT REGEXP_SUBSTR('/first/second/third word/fourth./','/[a-z .]*/', 1,1) first,
REGEXP_SUBSTR('/first/second/third word/fourth./','/[a-z .]*/', 1,2) second,
REGEXP_SUBSTR('/first/second/third word/fourth./','/[a-z .]*/', 1,3) third,
REGEXP_SUBSTR('/first/second/third word/fourth./','/[a-z .]*/',
1,4) fourth
FROM DUAL
but the occurrence value (the 1 or 2 or 3 or 4) in the manual from
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/functions116.htm
doesn't work properly. I think it does work but it is my sql that is wrong as I am a beginner. Can someone help me with the correct regexp_substr commands?
Thank you
Andy Received on Sat Feb 24 2007 - 08:38:20 CST
![]() |
![]() |