regexp_substr for values between a start and an end point

This should be easy, but I'm fighting
How do you get the text between points, but not including not not these points in a single expression of regexp_substr?
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
gives me
 start this is the text I want end
but my little brain think that [^ (start) (end)] meant not beginning or end

So what I try to achieve is
this is the text I want 

It is easier to remove anything you don't need with regexp_replace:

SQL> with t as (
  select 'blah blah blah start this is the text I want end blah blah blah' txt from dual
)
--
select regexp_replace(txt,'(.*start)|(end.*)') x
  from t
/
X
-------------------------
 this is the text I want
1 row selected.

Tags: Database

Similar Questions

  • I use SyncToy 2.1 for syncing between two readers and I wonder if it is possible to synchronize three discs without causing confusion for SyncToy.

    Hi all, I use SyncToy 2.1 for syncing between two readers and I wonder if it is possible to synchronize three discs without causing confusion for SyncToy. In other words, I want to have a (portable) master and synchronize with a Home Office and a disc of office disc.

    Original title: SyncToy 2.1

    Hello

    Thanks for posting your question on Microsoft Community!

    After your description, it seems that you need more information about SyncToy 2.1.

    I would like the season help you post you question on the following link for better.
    http://social.Microsoft.com/forums/en-us/SyncToy/threads

    I hope this helps!

  • Since then, when I start the computer, it goes through a few stages starting and then ends with a black screen with a cursor flashing at the top.

    I left by mistake a USB in the port when I restarted my computer (Windows 7).

    Since then, when I start the computer, it goes through a few stages starting and then ends with a black screen with a cursor flashing at the top.

    If I press ESC during startup and access the start menu, something marked WED... is highlighted and I press on enter and it starts normally.

    How can I get Windows 7 to do a normal boot without having to access the Boot Menu each time?

    Thank you.

    Tried that, but it did not work.  Finally got and IT guy come and it took him 3 1/2 hours to repair.

    Need a bootable floppy which has then repairs itself.

    Lesson learned.  Have an available for each computer startup disk.

  • Average of all values between (above first and last above) a threshold value.

    Currently I have a VI where I programmed a year or more ago, takes any value of a set of data that exceeds a certain threshold. It is used to capture the average of all values above a threshold when there is a peak of the values that exceed this threshold. However, when there are two or more peaks that exceed this threshold, only values greater than this value are averaged, so the final result is the average of the two or more.

    What I need is for each value that occurs after the threshold is reached, and before that the threshold fell below for the last time. Imagine a set of data whose graph looks like the letter "M" for example with the threshold being to halfway to the top of the M, I want to show the average (the first bump, the fall below the bumps, as well as the last bump) but what I'm saying now is the average of (the first bump, over the last bump). What I get now cut the data between the two summits.

    Any help would be appreciated of course.

    Here's a method, perhaps not the best.

  • I bought the upgrade for $ 80 between lightroom 4 and lightroom 6.  I now get a message in the upper left corner of lightroom that says mobile trial ending in 30 days

    I wonder how do I get my status in lightroom to change mobile trial to be truly permanent.  the lightroom icon 4 is always next to my lightroom icon 6 in doc.  I bought the upgrade and did all the necessary steps as told to me by adobe.

    Mobile Lightroom is a separate application that can be installed on your IOS or Android. This will allow you to create collections that can be shared in the cloud and edited on the mobile device. Lightroom Mobile is offered as a trial in Lightroom 6. You have 30 days to evaluate if he is a valuable asset for you. Your Mobile with Lightroom access will be terminated at the end of 30 days. It is only available for those who subscribe to the creative cloud. It has nothing to do with the program of office of Lightroom. If you are sure that you are not interested in using Lightroom Mobile you can click the identity plate and make a pause this feature, and I think that notification of the trial will stop at the display.

  • time between the start and end

    I have reservation with 4 columns of table

    start end id room
    20.10.2011 09:00 20.10.2011 12:00 1 100

    How can I get the following result

    time room id
    09:00 1 100
    09:30 1 100
    10:00 1 100
    10:30 1 100
    11:00 1 100
    11:30 1 100
    12:00 1 100

    can someone help me?

    It should work

    WITH
        t AS
        (
            SELECT
                TO_DATE ('20-Oct-2011 09:00','dd-mon-yyyy hh24:mi') start_date_time,
                TO_DATE ('21-Oct-2011 11:30','dd-mon-yyyy hh24:mi') end_date_time,
                1 id,
                100 room
            FROM
                DUAL
            UNION ALL
            SELECT
                TO_DATE ('20-Oct-2011 09:00','dd-mon-yyyy hh24:mi') start_date_time,
                TO_DATE ('21-Oct-2011 11:00','dd-mon-yyyy hh24:mi') end_date_time,
                2 id,
                200 room
            FROM
                DUAL
        )
    SELECT
        TO_CHAR(start_date_time + (column_value-1)*(1/(24*2)),'dd-mon-yyyy') start_dt,
        TO_CHAR(start_date_time + (column_value-1)*(1/(24*2)),'hh24:mi') start_time,
        id,
        room
    FROM
        t,
         table(
           cast(
                 multiset(
                             select  level
                               from  dual
                               connect by level <= ((end_date_time - start_date_time)*24*2) + 1
                           )
                 as sys.OdciNumberList
                )
          );
    

    Test case with the smaller date range

    WITH
        t AS
        (
            SELECT
                TO_DATE ('20-Oct-2011 09:00','dd-mon-yyyy hh24:mi') start_date_time,
                TO_DATE ('20-Oct-2011 11:30','dd-mon-yyyy hh24:mi') end_date_time,
                1 id,
                100 room
            FROM
                DUAL
            UNION ALL
            SELECT
                TO_DATE ('20-Oct-2011 09:00','dd-mon-yyyy hh24:mi') start_date_time,
                TO_DATE ('20-Oct-2011 10:30','dd-mon-yyyy hh24:mi') end_date_time,
                2 id,
                200 room
            FROM
                DUAL
        )
    SELECT
        TO_CHAR(start_date_time + (column_value-1)*(1/(24*2)),'dd-mon-yyyy') start_dt,
        TO_CHAR(start_date_time + (column_value-1)*(1/(24*2)),'hh24:mi') start_time,
        id,
        room
    FROM
        t,
         table(
           cast(
                 multiset(
                             select  level
                               from  dual
                               connect by level <= ((end_date_time - start_date_time)*24*2) + 1
                           )
                 as sys.OdciNumberList
                )
          );
    
    START_DT          START_TIME ID                     ROOM
    ----------------- ---------- ---------------------- ----------------------
    20-oct-2011       09:00      1                      100
    20-oct-2011       09:30      1                      100
    20-oct-2011       10:00      1                      100
    20-oct-2011       10:30      1                      100
    20-oct-2011       11:00      1                      100
    20-oct-2011       11:30      1                      100
    20-oct-2011       09:00      2                      200
    20-oct-2011       09:30      2                      200
    20-oct-2011       10:00      2                      200
    20-oct-2011       10:30      2                      200                    
    
     10 rows selected 
    

    Thanks to Solomon Yakobson to its solution on thread:

    Search for a string

    I found the solution from there.

  • Initialization of Mediacore for 3 years to start and Quicktime not installed (NEW)

    Hello

    I've been reading about this problem, but none of the solutions I found (mainly by removing the entire Adobe folder in the preferences) solved.

    That's what we have:

    Adobe After Effects CC 2014

    Mac OS 10.10.1

    QuickTime Pro 7 and 8

    At startup, AE takes a lot of time idling on "initializing Mediacore. When the program finally opens, we get this message: "Quicktime is not installed on this system, some components will not work."

    How can I fix?

    Thank you!

    It is usually because something (like software firewall too aggressive) blocking internal TCP connections:

    Initializing MediaCore

  • bending problem between a file and an anchor point

    With Dreamweaver CS6, I'm tying a File1 to an anchor in a File2 (the two files are in the root folder). Browsers do not open the page with the anchor.

    If the anchor is on the same page, it works.


    Thanks in advance for your help

    Place it in file1

    Anchor in File2

    and have an anchor in File2 like

    or similar

  • I can create a keyboard shortcut to start and/or end of work area?

    Just like in the title...

    I can create a keyboard shortcut to the CTI for the beginning or the end of the work area in the timeline?

    In addition, can I remap the shortcut (~) that maximizes the current Panel?

    I can't find the answers to any of these questions in the help...

    See you soon

    Mark

    I can create a keyboard shortcut to the CTI for the beginning or the end of the work area in the timeline?

    N °

    In addition, can I remap the shortcut (~) that maximizes the current Panel?

    In CS5, there is demand and called "expand or restore Frame. In CS5.5, is also under the Application, but you have two choices: "Maximize or restore the active Frame" and "expand or restore Frame under cursor. The latter is how CS5 works; the first is a new addition and will only maximize/restore whatever the framework is currently framed in yellow, for example asset.

  • How do Audio/Vedio streaming between web cams and back-end servers?

    I want to implement an internet chat application, I mean, I want a front end, which connects a web cam (microphone and speaker). So I can send video and audio on a back-end server (Flash streaming? but I don't know what a good product out there, I can use) and also send A / V on another computer on the internet. Need in other words, a front end that sends one premises / webcam v (& mic) for the backend and receives remote has / v of backend for webcam (and speaker) + backend streaming server.

    Any suggestions for techniques to use? What streaming flash backend server I should sue? How to acquire A / V of webcam (& mic) and how to send A / V for webcam & speaker to play?

    Thank you very much!

    Before the end of development:-you can use Flash CS4/CS5 or Flex Builder.

    Dorsal programming - programming side server is essentially using ActionScript. You can use Flash CS4, but there is no need special tool creation, you can do with the same text editor. After that you create, you just need to place the files in the right place on FMS.

    Front-end length - you just need Flash Player installed, mainly ActiveX or plugin in your browser - which you would already have now

    Also, if you decide to write the AIR application to your front-end, you need AIR - what is free again

    Hope that answers your questions

  • MBAM - BitLocker Administration and Monitoring (end point of service recovery)

    When I have access to the

    http://webservername/MBAMComplianceStatusService/StatusReportingService.svc

    and show the message in the web browser below.

    You have created a service.

    To test this service, you will need to create a client and use it to call the service. You can do this by using the svcutil.exe tool from the command-line with the following syntax:

    svcutil.exe http://webservername/MBAMRecoveryAndHardwareService/CoreService.svc?wsdl
    

    You can also access the service description in a single file:

    http://webservername/MBAMRecoveryAndHardwareService/CoreService.svc?singleWsdlAnd I think this lead to the event log "Unable to connect to the MBAM Recovery and Hardware Service." in client computerError Code: -2143485947Details:Access was denied by the remote endpointThanks for help.
    

    RC

    We support software and Microsoft products.  Contact them to MMFA for Symantec contact with them.  I think that this is related to the MMFA

  • Table, shuffle a part of a table using start and end Index does not work properly

    Hello
    I used a method to mix a part of an array, but I noticed that it does not work very well.
    When I run this method sometimes I empty array values.

    So if you try the example below and test out a few times would get you a good result but sometimes a wrong result.


    For example, when I run the present I get in my trace output:

    a, b, c, d, g, e, f (here after the g it won't)

    a, b, c, f, g, d, e (here it goes right)

    a, b, c, d, g, f, e (here I'm not)

    var myArr:Array = ['a', 'b', 'c', ', 'e', 'f', 'g'];

    function shuffle(myArray:Array,_startIndex:int_=_0,_endIndex:int_=_0):Array {}
    if(endIndex == 0) endIndex = myArray.length - 1;
    for (var i: int = endIndex; I > startIndex; i--) {}
    var randomNumber:int = Math.floor (Math.random () * endIndex) + startIndex;
    var tmp: * = myArray [i];
    myArray [i] = myArray [NombrAl];
    myArray [NombrAl] = tmp;
    }
    return myArray;
    }

    trace (shuffle (myArr, 3, 5));

    No one knows where he goes wrong and why nobody on the web discovered this problem previously, because
    When I googled on this topic, I found other methods that also sometimes fail.

    Kind regards
    Chris.

    var myArr:Array = ['a', 'b', 'c', ', 'e', 'f', 'g'];

    function shuffle(myArray:Array,_startIndex:int_=_0,_endIndex:int_=_0):Array {}
    If (endIndex == 0) {}
    endIndex = myArray.length - 1;
    }
    for (var i: int = endIndex; I > = startIndex; i--) {}
    trace (i)
    var randomNumber:int = int (Math.random () * (endIndex + startIndex-1)) + startIndex;

    var tmp: * = myArray [i];
    trace (i, randomNumber)
    myArray [i] = myArray [NombrAl];
    myArray [NombrAl] = tmp;
    }
    return myArray;
    }

    trace (shuffle (myArr, 3, 5));

    There were a few issues going on here.  The first is that you used the index end to the random number, but should be the difference between the beginning and the end.  the second is the > = start index in the loop.  give this a go.

  • Comparison operators - between the upper and lower - performance

    Hello

    I use instead of < and superior of the operators.

    Please let me know which works better for dates.

    I tried searching online, but couldn't manage to get and answer.

    to help between -.

    TRUNC (O_DT) BETWEEN

    (MAX_DT) + 1 TRUNC AND TRUNC (SYSDATE)

    using the < and >.

    TRUNC (RECORD_DT) > = TRUNC (MAX_DT) + 1 AND

    -TRUNC (RECORD_DT) < TRUNC (SYSDATE)

    Thanks in advance

    I use instead of< and="" greater="" than="" operators="">

    Please let me know which works better for dates.

    I tried searching online, but couldn't manage to get and answer.

    It's very strange. When I search "Oracle 11 g BETWEEN" I have tons of references and one of them is the language SQL Oracle doc for the BETWEEN operator that answers your question:

    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/conditions011.htm

    And the value of

    expr1 BETWEEN expr2 AND expr3
    

    is the value of the Boolean expression:

    expr2 <= expr1 AND expr1 <= expr3
    

    If expr3 <> expr2 , then the range is empty. If expr1 is NULL , the result is NULL . If expr1 is not NULL , then the value is FALSE in the ordinary case and TRUE when the key word NOT is used.

    The Boolean operator AND can produce unexpected results. More specifically, in the expression x AND y , the condition x IS NULL is not sufficient to determine the value of the expression. The second operand must always be evaluated. The result is FALSE If the second operand has the value FALSE and NULL otherwise. See "Logical terms" for more information on AND .

    As others have pointed out the operator BETWEEN is included the two end points.

    But slightly differently that others have commented the above evaluation order:

    Expr2<= expr1="" and="" expr1=""><=>

    Note that 'expr2' is on the side left SIDE of the operator; It is different from that

    n between x and y, = , n > = x and n<=>

    Also note the VERY IMPORTANT NOTE about this AND operator. This is why the order just mentioned above (expr2 on the left side) is important and, if the null value, can affect the results.

    In practice, for the simple example date of your use cases generally useless to worry about using it.

    Using BETWEEN makes it easier to ensure that endpoints of the range are used (if it is your use case), but can generate errors if high endpoint is not supposed to be used. And, in my experience, using BETWEEN seems to be easier for new developers to code and maintain for two reasons:

    1. There is no chance to use the wrong accidental deletion of an equal sign ('=') operator. An accidental deletion would not often be noticed but can potentially cause data from weeks, months, or years later when happens to you just to have data with this exact endpoint. Bugs can be very long to find.

    2. it is easier, IMHO, to realize that you don't need a TRUNK or other function on the date column since when you use BETWEEN you NEVER check for a match on the exact date using equals. New developers, especially those from other DBs, may have a hard gripping as an Oracle DATE value ALWAYS includes a component "hour". So, if you code this:

    myDate = someValue

    This is ONLY true if the components of the date and time are equal. Which is exactly why you have the TRUNC function in your example. The only way to use an EQUAL sign like that if you want the data from "Today" is do TRUNCATES the two values. And if you do that allows you to disable the use of an index that might have been used before (as others warn you).

    If you are using BETWEEN you apply TRUNCATES the constant 'someValue' (or SYSDATE in your example). So, I find that when I teach/train use BETWEEN new developers, they have a lot less trouble knowing how to write such a condition correctly. They make fewer mistakes that can cause data problems or to disable the index.

  • Display the default value between Dates in guest of dashboard

    OBIEE 11 g

    My users would say the default values shown in my dashboard of the guests. So far, I have created a guest of Dashboard using between operator for dates between CURRENT_DATE - 7 and CURRENT_DATE through SQL results. However, when the dashboard is running the date fields are blank and have not of these dates. Does anyone know how to get these to display. Thanks in advance.

    Instead of current_date-7 you can try with timestampadd(SQL_TSI_DAY,-7,current_date) and
    TIMESTAMPADD(SQL_TSI_DAY,0,CURRENT_DATE)

    It should work.

  • Satellite P - grains of dust between the screen and before

    Hello.

    After a few weeks of suddenly, I have a speck of dust between the screen and front end.
    How can he get there and so I have to send in the laptop to the service?

    Greetings from the Germany and sorry for my bad English.

    Hello

    I think that it of difficult to say something about it, but I think that in this case, you can't do anything. The only chance is in touch with an authorized service provider because technicians can disassemble the laptop and check this box. If you disassemble the notebook you will lose you warranty so I n t this

    If you don't know where is the nearest ASP, you can search here:
    http://EU.computers.Toshiba-Europe.com > support & downloads > find an authorized service provider

    Simply contact the technicians. You will see that it s interesting to talk with them a little and they are friendly. ;)

Maybe you are looking for

  • How to delete WhiteSmoke B personalized Web search?

    I tried malwarebytes, revo, adaware, superantispyware, etc.. nothing will get rid of whitesmoke. I even uninstalled firefox and re-installed. I have IE and there no whitesmoke, Chrome, I downloaded and there no whitesmoke. I guess I'll use other brow

  • which file in DAQmx replace zadvd.llb?

    I have installed here DAQmx but I have a program here that use the zadvd.llb and I know that this law comes from the Tradicional DAQ I want to know if have a few new llb replace that one with DAQMX? Thank you

  • How to select the resolution of the PC to the customer for the execution of LV App?

    Hello My GUI is 1250 x 812. (assuming that it is the value of a pixel. This is measured using the width and height-> resize option object).  What resolution PC should I offer for the customer who is going to run this GUI? Thank you!

  • Cisco Security Manager license key

    Hello We have installed in the Cisco Security Manager version 3.3.1 years back and now want reinstalled on the other server, but do not know the license key. Please guide how we can find the license key. Thank you

  • Lightroom import the missing target files

    Normally, I import from my CF flash card and choose a folder target on my external hard drive to destination.I begin each new job with a new catalog.But just recently, the destination on the right folder option disappeared.Someone know why?I SPEAR LI