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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

regexp_substr to get the values between a start and end point

pollywogOct 1 2010 — edited Oct 2 2010
this should be easy but I'm struggling
how do you get the text between to points but not including those points in one regexp_substr expression?
for example
WITH t
        AS (SELECT 'blah blah blah start this is the text I want end blah blah blah'
                      txt
              FROM DUAL)
SELECT REGEXP_SUBSTR (txt, '( (start).*end)[^(start)(end)  FROM t
is giving me
 start this is the text I want end
but my tiny brain thought that [^(start)(end)] meant not start or end

so what I am trying to acheive is
this is the text I want 
This post has been answered by MichaelS on Oct 1 2010
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 30 2010
Added on Oct 1 2010
5 comments
6,295 views