Find ' [' and get the substring entered using regexp_substr()]

Hello

Select regexp_substr ("what a great day for (I YOU [ME] and HIM ',' [: ALNUM:] * [^ \ ()] *') double;")
As a result:
SQL > what a great day for

[but why this model does not work for ']' when I replace ' ([' with ']'?)
Select regexp_substr ("what a great day for (I YOU [ME] and HIM ',' [: ALNUM:] * [^ \]] *') double;")
As a result:
SQL > W

' {[I need to get a substring before or ' (',' [',' {', '}])', ']', or '}' in a string to give, this model works for '(',') ', ' {', '}' but not ' [' or ']'
What should be the boss? If ' [: ALNUM:] * [^ \ ()] *' is not correct?

Can anyone help?

Thank you
Fiona

Hi, Fiona,

Have you seen this part of my last post?

Frank Kulash wrote:
... If you want to use a literal hook closing ('] ') then it must be the first thing in the list attached hook (not counting the ^, if you use it, you are)

In a regular expression, if you want to say: "the set of all characters * except * ' {' and '}'", so it does not matter if you say

[^{}]

or

[^}{]

Most of the people (you and me included) seem to like the first better way, but the results are the same. It deosn to matter if the ' {' is listed before the '}', or if they are in reverse order. The Analyzer don't think you want to say something else anyway.

However, the parser will treat this expression

[^[]]

different than

[^][]

The first:

[^[]]

is interpreted as

'['          ||     -- Any character from this set:
   '^'          ||     --     all characters except
   '['          ||     --     left-bracket
']'          ||     -- (end of set description)
']'               -- followed immediately by a right-bracket

You want to support the right to part of the whole. The only way that the parser will know that the right-braket marks not the end of the game is to put the right first overall support, in other words, it must be the first character inside the pair of brackets that delimited the game, immediately after the ' ^' character, like this:

'['          ||     -- Any character from this set:
   '^'          ||     --     all characters except
   ']'          ||     --     right-bracket or
   '['          ||     --     left-bracket
']'               -- (end of set description)

or, as you're more likely to write it:

select      'What a good day for (YOU [ME] and {HIM}) and others'     AS orig_txt
,     REGEXP_REPLACE ( 'What a good day for (YOU [ME] and {HIM}) and others'
                 , '\[[^][]*\]'
                 )                         AS new_txt
from      dual
;

Output:

ORIG_TXT
---------------------------------------------------
NEW_TXT
-----------------------------------------------
What a good day for (YOU [ME] and {HIM}) and others
What a good day for (YOU  and {HIM}) and others

Tags: Database

Similar Questions

  • Analysis of query and get the list of used tables

    Hi all

    I need to parse the sql query (simple & complex as well) and for a list of the tables used in the query.

    And need to validate the fact that list the tables against a whitelist that is kept in the file.

    I tried to write my own parser, because there are many ways to write complex queries, I'm unable to cover all scenarios.

    I need help, is there other ways to get the list of tables used in a query?

    Thank you

    Manon...

    In general you would add a condition 1 = 2 just to restrict the display of the entire table. Then should not be causing any noticeable performance degradation. You can even use ROWNUM< 2.="" that="" will="" do="" a="" count="" stopkey.="" which="" could="" be="">

    SQL > select * from emp where rownum<>

    no selected line

    SQL > select * from table (dbms_xplan.display_cursor);

    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    SQL_ID, 97f4bd002xfy0, number of children 0
    -------------------------------------
    Select * from emp where rownum<>

    Hash value of plan: 4269703525

    ---------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ---------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |      |       |       |     2 (100) |          |
    |*  1 |  COUNT STOPKEY |      |       |       |            |          |
    |   2.   TABLE ACCESS FULL | EMP |     1.    38.     2 (0) | 00:00:01 |
    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    1 Filter (ROWNUM<>

    19 selected lines.

    But its always good to bench mark it yourself.

  • How to make httpconnection and get the xml response using httpconnection in post method.

    Hello

    I am new to the blackberry web work,

    I want to make httpconnection using the post method and also pass a parameter related to my url.

    This function returns xml data.

    How can I perform this task.

    Please help me if anyone has a solution...

    I have soved that problem myself.

  • I can't sync my phone to my computer and get the message that my phone doesn't have the latest version of Itunes. I downloaded the latest version on my mac, but what I do on my phone. I'm used to be able to synchronize the two.

    I am more able to sync my I phone on my Mac and get the message that my phone cannot be used because it requires a newer version of iTunes. He tells me to go to www.itunes.com to download the latest version of iTunes... I downloaded the latest version on my mac, but what I do on my phone? I used to be able to sync the two and now I can't even download the photos from my phone on my mac...

    iOS9 on a mobile device requires iTunes 12.3 or higher, which in turn requires a computer running OSX 10.8.5 or higher.  Update of the system only checks the updates for the current version of the system you run, but that itself can be updated.  It may or may not be possible to upgrade your computer to the system requirements. Find your computer on the web site of http://www.everymac.com model and near the bottom of the specification of the system section, he will tell what versions of the operating system, it is able to run. If you can not run a newer system, you will not be able to sync this phone to your current computer. If she can run 10.8.5 or higher, you can either buy a download for Apple OSX 10.8 Mountain Lion code online, or you can try to install the free El Capitan OSX 10.11.  El Capitan can run slower on older machines and require the additional purchase of RAM.  Making a big jump in versions of system is also more likely to affect the old software.

    At el capitan Snow Leopard, it will make my macbook is slow?  - https://discussions.apple.com/thread/7412959

    Mountain Lion 10.8 purchase link United States of America - http://www.apple.com/shop/product/D6377Z/A/os-x-mountain-lion

    Mountain Lion 10.8 purchase link U.K. - http://www.apple.com/uk/shop/product/D6377ZM/A/os-x-mountain-lion

    Course OSX Upgrade General information, including configuration required - http://www.apple.com/osx/how-to-upgrade/

  • in the finder under devices, I see a remote disk. This means that someone has access to my computer and how to find and get rid of this or is it a disk bound one of my devices?

    In the finder under devices, I see a remote disk. It means someone has access to my computer?, and how find and get rid of it. Or is it a disk bound one of my devices? I have an iMac El Captan10.11.3

    # Remote disc is a feature that allows you to use the CD drive from another computer.

    It is always in the Finder, and when Setup a disc in another computer it will appear.

    It is perfectly normal.  No one has access to your computer.

    You can read more here:

    Use the CD or DVD drive from another computer with your Mac - Apple Support

  • How can I find and get rid of the duplicates

    How can I find and get rid of the duplicates

    Hi sinkerslider,

    I apologize for the long delay. In what app work? Looking for double .jpgs, PSD etc files. ? Also, what device and operating system are you using? Thank you very much!

    -Kathleen

  • For the power level icon is missing from my taskbar. How do I find and get it again showing the taskbar?

    For the power level icon is missing from my taskbar.  How do I find and get it again showing the taskbar?  I've tried the suggestions help and read the FAQ, but in vain.

    Hi Dee Gilles,

    Welcome to the Microsoft community. According to the description, power icon is missing from the taskbar.

    ·         Did you do changes on the computer before the show?

    I'll help you with this problem. I suggest you follow these methods.

    Method 1: Follow the steps in the article.

    Icons of programs that are pinned in the taskbar may be missing or is not correctly displayed on Windows 7 computers

    Method 2: Scan the System File Checker (SFC) to repair corrupted files.

    I hope this helps. Let us know if you need help with Windows related issues. We will be happy to help you.

  • I have a new computer with Windows 10 and will use Acrobat 9.0 Standard of my old computer (Windows 7). I download the program for Adpbe and when I install it so I put my serial number and get the answer, it is not a number valid serial. What it takes

    I have a new computer with Windows 10 and I use Acrobat 9.0 Standard of my old computer (Windows 7). I download the program from Adobe, and when I install it then I put my serial number and get the response "is not a number valid serial. What should do? I have an account at Adobe with all my serial number

    Hi rolfb13339293,

    I would like to inform you that acrobat 9 is not compatible with windows 10.

    You can check system requirements here: Adobe Acrobat required configuration

    The latest version is Acrobat DC.

    Please let us know if you need additional assistance.

    Concerning

    Sarojini

  • good night, is that what happens when you open cloud creative design I check your email and get the following email (&lt; deleted by the moderator &gt;) and let my id or enter gives me more options

    good night, is that what happens when you open cloud creative design I check your email and get the following email (< deleted by the moderator >) and let my id or enter gives me more options

    Hello

    Follow please: address error to connect to Creative Cloud Desktop, Email how to pass my e-mail? and CC has a fake email, can not change

    Kind regards

    Sheena

  • installed Acrobat DC and get the error indicating the serial number is valid but cannot find any product calling on my computer

    installed Acrobat DC and get the error indicating the serial number is valid but cannot find any product calling on my computer

    As indicated, with an upgrade (apparently what you bought) you will get a request for both the new S/N in the old S/N - assuming that a qualifying product is not installed).

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • Try to use casStubs.jar classes and get the parameters of the analysis

    I went into class files available in casStubs.jar and was trying to come up with a script in the AppConfig.xml to connect to the CAS server and get the State of analysis and measures. I tried this option because the com.endeca.eac.toolkit.component.cas.ContentAcquisitionServerComponent class gives me these features.

    + < id script = "CheckCrawlStatus" > +.
    + < bean-shell-script > <! [CDATA [+]

    Import javax.xml.namespace.QName;
    com.endeca.cas.wsdl import. *;


    final String wsdlUrl = "http://" "${cas.host} '+': ' + ' ${cas.port} ' + ' / case? WSDL "; +
    final name of QName = new QName ("http://endeca.com/itl/cas/2010-07", "CasCrawlerService");
    CasCrawlerServiceLocator service = new CasCrawlerServiceLocator (wsdlUrl, name);
    CasCrawler robot = service.getCasCrawlerPort ();

    String crawlName = "myFirstCrawl";
    CrawlId crawlId = new CrawlId (crawlName);

    Metric [] metricArray = crawler.getMetrics (crawlId);
    + / / rest of the code to retrieve the crawl settings.

    +] > < / bean-shell-script > +.
    + < /script > +.

    Unfortunately, I still get connection refused to exception: ' java.net.ConnectException: connection refused ". My wsdl case load properly in my browser.
    Any ideas on gaps in the code or the missing configuration in the CASE or DT or platformservices?

    Thank you
    Dev

    Try to explicitly set endpoint to service before obtaining the port. So, if you connect to localhost:8500:

    service.setCasCrawlerPortEndpointAddress ("http://localhost:8500/AR"); ")

    You can substitute your host/port settings. This call is normally done through the box tool component wrappers, but since you are directly using the stubs of service, you will need to set the end point. Without this, the stubs use a test port that do not match your.

    Best
    Brett

  • A Script to find and replace the layer names

    Is there scripts to find and replace the names of layers?

    There is an excellent script available for Photoshop that allows you not only to replace words in layer names, but also insert words as prefixes, Suffixes and sequential numbers.

    The version of the illustrator of this script allows only sequential numbering: it does not offer search and replace words.

    Ideally, it would be great if there were something that could find multiple and replaces in a go:

    (for example

    You have layers like this car, the dog, the bat

    You enter: because (Option1), dog (Option2), Bat (Option3)

    Your layers become then: option 1, option 2, Option3).

    )

    Big_SmiLe, which is a very good start! Step 1 of learning how to Script is indeed, by adjusting an existing simple script to make things more complicated. (And usually then "break something", which is also a necessary part of the process.)

    You are right your comment, it comes to repetitive things. For one or two different articles that wouldn't be a problem, but in the longer lists you are soon lost.

    As usual to work with lists of search - replace is to build a table:

    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    ];
    

    The general idea is to loop through all the names, check if the current layer name is "layernames [i] [0]" (the left column) and if so, rename it "layernames [i] [1]" (the right column). If you know how to write a loop in Javascript, then you can implement this immediately.

    However...

    A more advanced method to do this didn't need even loop on all layernames - instead you can immediately 'get' the correct name by layer! It's magic! Almost!

    The trick is to use a Javascript object rather than a table. JavaScript objects are nothing special; "Layers" of Illustrator are an array of objects, and each object 'sex' has a 'name' property, which you can read and set the value. What I do here, is to create a new object, where the part 'name' is the name of the original layer and its value is the name of the new layer. All you need to check each layer is if there is a "object.originalLayerName" property and if so, assign its value to this layer name.

    It looks a bit like the table above, except that (1) you use {.} instead of [..] to create an object and (2) you add pairs "name: value" instead of 'value' only (in fact, the 'name' of a value in a table is simply her number).

    So here's what it looks like:

    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
     'FHairBowlBoy *Hair':'Hairboy1',
     'FHairCurlyafroBoy *Hair':'Hairboy2',
     'FHairSpikyBoy *Hair':'Hairboy3'
    };
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    {
     //Set up Variable to access layer name
     var currentLayer = app.activeDocument.layers[i];
     if (layernames[currentLayer.name])
     {
      currentLayer.name = layernames[currentLayer.name];
     }
    }
    

    Enjoy!

  • I can't clear the permission and get the following error message: failed to clear approval. Please try again after some time.

    I can't clear the permission and get the following error message:

    Cannot clear permission. Please try again after some time.

    I want to be able to allow so I can transfer files to my torchlight Nook more

    Macintosh:

    1. exit the Adobe Digital Editions software.
    2. Navigate to / Users / / Library/Application Support/Adobe/Digital Editions and drag the activation.dat file to the trash.
      If you use 10.7, see library access hidden files. Mac OS 10.7 and later.
    3. Open Adobe Digital Editions and reauthorize.

    Windows:

    1. Close all applications.
    2. Click Start > run.
    3. Open, type regedit in the text box and press ENTER. The Registry Editor opens.
    4. In the left pane of the registry editor, locate the following registry key: HKEY_CURRENT_USER\Software\Adobe\Adept
    5. Select the key of the follower.
    6. Choose file > export.
    7. In the export registry file dialog box, select the branch selected under export range. Enter a name and location for the backup registry key, and then click Save.
    8. Right click on the key to the follower, and then choose Remove.
    9. In the dialog box confirm the key deletion, click OK.
    10. Close the registry editor.
    11. Open Adobe Digital Editions and reauthorize.
  • Hi after windows 10 almost killed my laptop and I had to restore to factory settings I tried to re - install creative cloud and get the following message "WE ENCOUNTERED THE FOLLOWING PROBLEMS: INSTALLATION FAILED TO INITIALIZE program.» PLEASE DOWNLOAD A

    Hi after windows 10 almost killed my laptop and I had to restore to factory settings I tried to re - install creative cloud and get the following message "WE ENCOUNTERED THE FOLLOWING PROBLEMS: INSTALLATION FAILED TO INITIALIZE program.» Please DOWNLOAD ADOBE SUPPORT ADVISOR TO DETECT THE PROBLEM. "then I tried to download the Advisor to support that to find it is no longer available. Accept payment until this problem is solved we know how to solve this problem?

    first of all uninstall cc on your computer.

    Run the vacuum cleaner by, http://www.adobe.com/support/contact/cscleanertool.html

    Restart your computer and reinstall the cc, Download Adobe Creative Cloud apps desktop application | CC free trial Adobe

    If that translates into the same initialization error:

    start at the top and work your way down to apply applicable patches until your problem is solved.

    If (win) cc: https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html

    If your error is:

    "Setup failed to initialize. File not found. ' or 'could not initialize installation. This could be due to missing files.

    first of all, rename folder OOBE OOBE.old.

    to find the OOBE:

    Win 64 bit OS: Program Files x86\Common Files\Adobe\OOBE

    Win 32 bit OS: Program Files \Common Files\Adobe\OOBE

    Mac os: HD > library > application support of > adobe > caps

    Mac os: USER > library > application support of > adobe > OOB

    If it fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.

    If you use an installation dvd:

    Copy the contents of the drive in a desktop folder and install from this directory.

    If you are using a mac:

    1. try to create a new user account in Mac with administrator privileges.

    2. connect to the new user, navigate to Mac HD > Application > utilities > Adobe Installer folder, locate products such as Adobe Reader, Adobe Flash, Adobe Air and uninstall the

    3. navigate to the user library > Application Support > Adobe and Adobe put in the trash.

    4. navigate to Mac HD > library > Application Support > Adobe and Adobe put in the trash.

    5 restart the installation.

    If everything is applicable above fails, check your Setup logs:

    http://helpx.Adobe.com/Photoshop-elements/KB/troubleshoot-install-using-logs-elements.html

Maybe you are looking for

  • MacBook Pro Serial # does not appear in the search

    Hello I'm looking at buying a Macbook Pro, but when I am looking for the serial number I get no results. I would like to see if it is legitimate and under warranty. I tried the search tool of warranty on Apple's site, but no result. I would like esse

  • Comparison of 50 t-A494 and S55T A5277 satellites

    I'm going to buy a Toshiba laptop and you want to compare S50T-A494 S55T A5277.Can someone guide me in this regard? Thank you in advance.

  • Update IOS 9.2.1

    Nice day! I have installed and updated my iPhone to IOS 9.2.1 However, 6s whenever I plug in my phone to iTunes, it will prompt you to update me 9.2.1 IOS system. Is that what I should do or do I just ignore it? Thank you!

  • Chromebook, which software to download?

    I have a Canon Powershot A480 camera and want to download software on my Chromebook so that I can upload photos.  I used to have a PC, but now I don't know what software download.  It's the Chrome OS, but this is as far as I know.  Can you help me?

  • copy error: error 0 * 8007045D: the request could not be performed because of an i/o device error

    When copying the files, I get this error which is lower than an unexpected error prevents the operation.make a note of this error code, which might be useful if you get additional help to resolve this problem: error 0 * 8007045D: the request could no