How work REGEXP_REPLACE?

Hi all

How it works?

SELECT REGEXP_REPLACE('18.0.1', ' (\d+)\.) () \d+)\. ((\d+)', '\1') FROM dual; -> 18

Thank you

Hello 994122

This request is in fact equivalent to the following query:

SELECT REGEXP_SUBSTR ('18.0.1 ',' (\d+)\.) () \d+)\. ((\d+)', 1, 1, null, 1) FROM dual;

Because in the REGEXP_REPLACE in your code, you do not write only a part of the string exactly without modification to the original string (in the first group) you can call it a chain of analysis.

SELECT REGEXP_REPLACE('18.0.1', ' (\d+)\.) () \d+)\. ((\d+)', '\1') FROM dual; --> 18

\d: a numeric character, which equals the POSIX class [[: digit:]]

\d+: at least one or more numeric characters

(\d+): grouping of numbers operator - in REGEXP_REPLACE, you can make reference to such a group with \n

------: character for the exhaust point (because the dot has a meaning in the regular expression language that corresponds to the character of any)

.    : any character

"\1": in this case you write again the same value in the first group and you do not take account of the other party in the chain. (Reference)

'-1'-> it refers to the first group of your channel "(\d+). (\d+)\. (\d+)', of course without brackets

'-2'->, it refers to the second category of your channel of '(\d+)\.) (\d+)\. (\d+)', of course without brackets

'-3'->, it refers to the third category of your channel of '(\d+)\.) (\d+)\. (\d+)', of course without brackets

I hope it helps.

Best regards, David

Tags: Database

Similar Questions

  • How working batch entity Match to staged the output data?

    Hello

    I want all the duplicate with score of table records mid-range performer stand single entity lots of output. I don't know how to make for output account entity attributes (name, address and telephone, etc.) could you please somebody guide me how to do this?

    Thank you

    Most likely, you should not Match results - prepare and Match result - output in your work process. Clone work (drag up to the jobs node to create a copy with a different name) and delete these processes and the export of your job task. Then add a recorder to your game from UK - process of the entity with the data you need and an export job if you need to write the results to the outside.

    Note that you can also activate game review if necessary.

  • Difficult to understand how works the gradientStops.add)

    Hello

    I'm just playing with gradientStops.add (), and I had trouble getting my stops to be spaced along the gradient from 0 to 100.

    Here's a semi-functional code snippet:

    grad = app.activeDocument.gradients.add();
    for (i = 0; i < swatches.length; i++) {
      stop = grad.gradientStops.add();
      stop.color = swatches[i].color;
      grad.rampPoint = ((100 / l) * (i + 1));
      grad.midPoint = 50;
    }
    

    Where my "color chart" var contains a list of color objects.

    When I run the above code, I get this:

    Screenshot 2016-05-13 12.27.29.png

    Why my gradient start at 50% and go to the right (exponentially?)? I feel that my calculations are good, but it doesn't seem to work like how I can expect.

    My goal is to spread evenly the gradient across the width of the gradient itself, between 0 and 100.

    Could someone help me kick in the right direction?

    Thank you very much in advance!


    See you soon,.

    Micky

    MgradientStopsgra

    Your put grad.gradientStops [i] .rampPoint & grad.gradientStops [i] .midPoint, not grad.

    Also to note that when paid, gradients is already two gradientStops, so your should define the first and last one out the for loop.

     var grad = app.activeDocument.gradients.add();
     var sw = app.activeDocument.swatchGroups[1].getAllSwatches();
     var l = sw.length;
    
     grad.gradientStops[0].rampPoint = 0;
     grad.gradientStops[0].midPoint = 50;
     grad.gradientStops[0].color = sw[0].color;
    
     for (i = 1; i < l - 1; i++) {
         stop = grad.gradientStops.add();
         stop.color = sw[i].color;
         grad.gradientStops[i].rampPoint = i / (l - 1) * 100;
         grad.gradientStops[i].midPoint = 50;
     }
    
     grad.gradientStops[l - 1].rampPoint = 100;
     grad.gradientStops[l - 1].midPoint = 50
    ;
     grad.gradientStops[l - 1].color = sw[l - 1].color;
    

    Here is an image that I created with a script written many years ago.

  • How work schedule to only run during a time window

    I have a long task to schedule tasks to process the data.

    I want to only those tasks scheduled to start during a specific window of time each day, probably 22:00 to 06:00.

    If scheduled tasks do not start during the specified period of time, they must wait until the next day to begin to run.

    Each scheduled job to be executed once, then auto.

    How can I go about creating of these scheduled tasks?

    Hi Jeff,

    I agree that the documentation is not clear enough on the objectives of windows.

    You can use windows to change the resources plan, but you can also use them to plan your work.

    I did a simple test in real-time to illustrate the latter.

    At about 10:30 today, I created a table that will be filled by a job:

    CREATE TABLE TEST_WINDOW_TABLE (DATE EVENT_DATE);

    Then, I created a window whose start_date is today at 10:40 am:

    () dbms_scheduler.create_window

    window_name-online "TEST_WINDOW."

    resource_plan => NULL,

    start_date-online to_date (October 4, 2014 10:40 ',' dd/mm/yyyy hh24:mi:ss'),

    repeat_interval => NULL,

    time-interval '5' minutes online

    );

    You can see that this window has a resource plan, and its recurrence interval is NULL (so it will be open only once).

    The window will remain open for 5 minutes.

    Finally, I created a one-time job whose schedule is the previously created window:

    () DBMS_SCHEDULER.create_job

    job_name-online "TEST_WINDOW_JOB."

    job_type-online "PLSQL_BLOCK."

    job_action => ' BEGIN insert into test_window_table values (sysdate); COMMIT; END;',

    schedule_name => ' SYS. TEST_WINDOW',.

    -Online true, enabled

    auto_drop-online true

    );

    Check the user_scheduler_job_log before 10.40 returns no line, doing the work has not started yet because the window was not open.

    Now, 10 h 40, it shows an entry:

    SQL > select log_date, status of user_scheduler_job_log where job_name = "TEST_WINDOW_JOB";

    LOG_DATE                                                                         STATUS

    -------------------------------------------------------------------------------- ------------------------------

    04/10/14 10:40:02, 106000 + 02:00 SUCCEEDED

    Also, the TEST_WINDOW_TABLE has the line:

    SQL > select * from TEST_WINDOW_TABLE;

    EVENT_DATE

    ------------------------------

    04/10/2014-10:40:02

    This is.

    In your case, since you want to do the work a day between 22:00 and 06:00 (duration of 8 hours), the window would look like this:

    () dbms_scheduler.create_window

    window_name-online "YOUR_WINDOW."

    resource_plan => NULL,

    repeat_interval => ' freq = daily; byhour = 22; byminute = 0; bysecond = 0',

    duration-online '8' time-span

    );

    For your work, you may need to specify an end_date if you want to ensure that work gets down if could not operate in its window.

  • How work the files config.lok, AdminServer.lok and edit.lok?

    I could see in their respective locations that these files are 0 KB. So it was just curious to know how it works; It's just their exitence which tell that the lock is taken or should she have some content?
    Furthermore, what is the difference between the 3 .lok files?

    Hi Jeggar,

    There are config.lok, EmbeddedLDAP.lok, and XXXserver.lok files that are used by the server administrator and the server managed. Another file locking, named edit.lok is used for the server administrator only. Here are more details about each:

    config. Lok
    The config.lok file is just used to get a lock file on the file config.xml, to ensure that updates to config files run in the series. It won't be a problem if it exists in the directory.

    Edit.Lok

    The modification lock is used to ensure that only one user at a time is changing configuration. The editing lock is used on the administration server.

    EmbeddedLDAP.lok

    This file locks access to the embedded LDAP server, in order to ensure that only one process can access this directory server. If two processes write to the same directory server, the directory server will have a problem.

    XXXServer.lok
    The .lok [servername] indicates that the server with the name of [server name] is running. It is used to prevent a started server twice. If you are sure that this server process is stopped, you can remove it.

    Kind regards
    Kal

  • How work with vSphere inventory views

    vSphere is supported by the views of the inventory: hosts and Clusters, models and Virtual Machine, network and data warehouses.  How can I work with these different points of view?  Example: how to create a folder in the computers view virtual and models? Example: How to display the inventory from the warehouses of data only view?

    If you have only 1 defined in vCenter datacenter you can do

    New-Folder -Name "ServerVMs" -Location (Get-Datacenter | Get-Folder vm)
    

    If you have more than 1 data center, pass the name of the data center where you want to create the folder.

    Like this

    New-Folder -Name "ServerVMs" -Location (Get-Datacenter MyDatacenter | Get-Folder vm)
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • How work hang up to latest OS OS 4.6. 4.7.5.0

    Hai guys

    l have problem with my program on end call, for OS 4.5 (bottom), he works this function, but tried to BONE later, l as OS 4.6.4.7 and 5.0Doesnt works, any solution to this problem? my being someone's source for the latest OS?

    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    Try
    {
    System.out.println ("' kesini lah ah '");
    UiApplication app = UiApplication.getUiApplication ();
    Menu menu = app.getActiveScreen () .getMenu (0);
    System.out.println("jumlah:"+app.getScreenCount());)
    for (int i = 0; i)<= menu.getsize()="" -="" 1;="">
    {
    System.out.println ("menu" + i + ":" + menu.getItem (i) .getOrdinal () + "-" + menu.getItem (i) m:System.NET.SocketAddress.ToString ());
    If (menu.getItem (i) .getOrdinal () == 69632 / * | menu.getItem (i) .getOrdinal () == 16864261 * /)
    {
    menu.getItem (i) .run ();
    System.out.println ("blocked call");
    break;
    }
    }
    }
    catch (Exception ex)
    {
    System.out.println (ex.getMessage ());
    }
    }
    });

    Hai Simon

    Thanks for help you, my program it works now

    Thank you

    OnAir

    simon_hain wrote:
    you don't know. Go to the search box above and put in something that you are looking for. for example: end injector event call the result will look like this: http://supportforums.blackberry.com/t5/forums/searchpage/board-id/java_dev/tab/message?q=event+injec...

  • How work scenes, &amp; quot; gotoAndPlay &amp; quot; &amp; amp; MovieClips?

    Hello!

    I have a big problem when I'm working with movieclips, scenes & "gotoandplay" - command.
    Problem is I have a game where you can move the movieclip (player) with keys, so all these "gotoandplay-orders" must be to movieclips. So, I tried to use "_root.gotoandplay ();" - order, but during the second stage plays, and this code is used, it switches to the scene 1 (main, first...) and starts playing from there...
    So, I suppose, that this "_root", is not the right thing to be there, but what code would work?

    It comes to my school work, so I need answers fast... Thank you.
    BTW. Sorry my bad English

    If the label is executed, use:

  • How to restore passwords signons3.txt? And how works signons.sqlite?

    I had to restore my operating system. I could get places.sqlite to restore the bookmarks (good!). I could find a signons3.txt (dated July 2013) this file will be not complete or up to date, but at least it puts me somewhere before.

    I have read that I need a signon3.txt file to go with the key3. I don't have one. I found a file dated September 2014 signons.sqlite. I moved these two files in my profiles folder, but I don't fit my old password.

    Is it possible for me to use the old key3? Do the key3 and sign must be dated the same thing? Is it possible to recreate the signons.txt?

    I have the password.

    Thanks for help.

    Signons3.txt file store the encryption key used to encrypt and decrypt passwords.
    Encrypted names and passwords are stored in the logins.json file.
    The file signons.sqlite is no longer used in current versions since Firefox 32.

    You must move the logins.json and key3db files in the current profile folder to retrieve passwords.

  • How works a back to the immediately preceding, because there is no ButtonBack?

    Unlike other browsers, there seems to be no way to return to the previous page. Why is there no back button, found in IE and Chrome, for example?

    Hello
    Firefox also I have a back button on the TOP corner - LEFT at the side of the address bar. See the screenshot please

  • extremely slow after the automatic update of Firefox 7.0.1. is there something wrong with how works the automatic update?

    It takes a long time for each time I try to go to a new page. the browser crashes just for awhile. It started after that Firefox auto update 7.0.1.

    Try this

    Type in the address bar

    Subject: config

    Accept the warning.

    On the page that appears, in the filter box, type

    Network.http.Max - connections

    Replace the value 32 (which is probably the value 256 in your case).

    Close this page.

    Restart the browser.

  • BlackBerry Smartphones how works only once to pull the battery? (This is a serious question)

    Hi guys,.

    I can't help but feel incompetent when I can't remove the battery from my camera. I maybe just strong fingers, but not for the life of me, I couldn't remove the back panel of my 9700 when I have to reset my camera (I develop a GPS app and had to see the consistency of the time it takes to get the first stand-alone fix). Fortunately, I don't need to remove the battery very often, but I wish I could. Is there a good way to remove the said sign without damaging the unit?

    Watch the video to remove the batttery

    http://www.YouTube.com/watch?v=uQcO9I5P9dU

  • See the list with dividers collapsed: how works?

    I need to make my list from dividers view collapsed, there is an dividersCollapsed attribute:

    Screen Shot 2015-04-03 at 11.20.34.png

    Hi Ben,

    You can point the dividers attribute has collapsed to a managed bean method. This method returns an array of String.

    For example, I created status as the divisor attribute. It has three values - INPROGRESS, OPENED and CLOSED.

    Now I set attribute dividers collapsed as follows using the language of Expression: #{pageFlowScope.ManagedBean.collapsedStatusArray}

    This method is in my managed bean:

    public String [] getCollapsedStatusArray() {}
        S string [] = new String [2];
        s [0] = "OPEN";
        s [1] = 'CLOSED ';
        return s;
    }

    So open and closed dividers are loaded as collapsed.

    But INPROGRESS is developed.

    See image below:

    I hope it helps.

    Kind regards

    Deepak

  • JPanel and SetVisibility, not clear how works the paintComponent

    Hello

    I have a JFrame, which has defined by user JPanel is drawn where a chart based on the data of the registered user. (using the graphics classes)

    The paintComponent method draws at the start of the axis the x-axis and the y-axis (vertical and horizontal line)

    The thing is... Initially I'll put JPanel visibility to false. OnClick of a button, it is true, then we begin to plot points.

    It's getting... The Code for plot points are non-reflecting on Panel on the first click of the button. If I click on the new button (now JPanel is visible), the points are found.

    If I setVisible true, what happens to the JPanel?

    PEACE,
    Sandeep

    Draw your plots in paintComponent()
    Like this

    {
      super.paintComponent(g);
      drawAxis(g);
      if (plotsExists) {
        drawPlots(g); //pass graphics instance in the method
      }
    }
    

    Edited by: StanislavL the 04.11.2011 03:36

  • Extract information from your unique - how the equation works?

    Hello

    y at - it a detailed explanation or step by step on how works the equation used by your single extract?

    The equation is:

    I want to know or understand how frequency, amplitude and phase are established. Also, what is x (n)?

    Thank you.

    In this equation, x (n) represents the series of samples of the sinusoidal input signal. Samples are taken at intervals spacing 1/Fs seconds apart. Then, n/f means the the nth sample in the series.

    Internally, the VI takes a FFT of the time domain signal. It then uses a process of interpolation to find the frequency, amplitude and the phase of the input signal. Intermpolation is used because the highest point of the output of the FFT may not exactly be on the frequency of the signal.  This is caused by the frequency of the signal and the frequency of sampling in general not be exactly harmonically related.  I think that it corresponds to a polynomial of the second order (quadratic) to the top of the FFT output and determines the outputs of the values of the polynomial.

    Lynn

Maybe you are looking for