Question related to the REGEX functions

Hello

I'm working on Oracle 10 g 2.

I'm working on a column that stores the user name. Let's say that one of the values in this column is "John". I want to extract all records where username is a concatenated string of 'Ankur' followed by some numbers, such as 'Ankur1', 'Ankur2', 'Ankur345' and so on. I don't want to get the records that have values such as "Ankurab1" - i.e. everything that is the concatenation of some characters to my input string.

I tried to use the REGEX functions to achieve the desired result, but am not able to.

Can someone help me out here?

Best,
Ankur

It is a means.

SQL> with sample_data as (
  2    select 'Ankur1' str from dual union all
  3    select 'Ankur2'  from dual union all
  4    select 'Ankur345' from dual union all
  5    select 'Ankurab1' from dual)
  6  select str from sample_data
  7  where regexp_replace(str, '[0-9]+$') = 'Ankur';

STR
--------
Ankur1
Ankur2
Ankur345

John

Tags: Database

Similar Questions

  • I use a PC and I used LR3. I'm a newcomer to LR, so patient with me! My problem is related to the import function. I have a photo library on an external hard drive. I slowly imported previews of the photos selected from the library in

    I use a PC and I used LR3. I'm a newcomer to LR, so patient with me! My problem is related to the import function.

    I have a photo library on an external hard drive. I've slowly been import previews of the photos selected from the library in my catalog, adding them during the import process - well. But now, I hit a problem. Another folder in my library contains several subfolders, each containing a number of photos (a mixture of RAW steals (naves) and jpg). I was importing found in my catalog each Subfile in turn, using the Add function, usually of the jpgs only from each Subfile. It works fine, until I reached a particular Subfile. For some reason when I try to import from it and select the secondary file as a Source, only the RAW (NEF) images appear in the preview pane (sorry, forgot the correct term for it!). I know that jpg files are in this auxiliary file on the external hard drive, because when I view its content in Windows, they are all there. But try as I can (choose the file under source, select the folder parent as a source, try to copy or move them, instead of adding them), nothing seems to work. Since they do not appear in the preview pane, I can't import them. It does appear that this a Subfile where the problem exists, but I don't see anything that is different from the others (names of files under all use the same structure - yyyy-mm-dd_custom name, and pictures in all subfolders are adopting the same denomination structure too - yyyy-mm-dd_sequential number_custom name.) NAVE/JPG. So what I am doing wrong? Any ideas please.

    It is possible that the images in this particular subfolder were taken in your camera in RAW + JPEG.  If so, you will need to go to preferences under the general tab and make sure the box "processing JPEG files files next to raw as separate photos" is checked.

    However, assuming that this is the case, there is really no reason to import the JPEG file if you already have the RAW file.

  • Two questions relating to the signature using restricted code API: s

    First question

    I have a library that contains classes that requires the signature in order to use API:s. limited one of the functions in the library uses "persistent storage". My application accesses the library import library module, then instanciates and calls the function that I need.

    Is it enough to have signed library or don't call asking the library must sign too?

    Second question

    Is it possible to configure the simulator so it actually tests that the modules using API: s limits are signed correctly?

    Check the Simulator definition "activate the safety of the device. When this setting is enabled, the Simulator checks would be signatures almost like a true pocket computer. For your application, which should be pretty good. If your module is missing a required signature, the simulated Pocket will complain even as would a normal hand.

  • Problems related to the static functions

    Hello everyone, how are you?

    Here I am again with a question about static functions. I am building a class called "Photo Loader", its goal is to pass a url and a MovieClip with "PhotoLoader.loadPhoto." This method should return a bitmap that is added in the clips. I am not able to build a method I want to be independent of the Loader object. If anyone has experienced this?

    Kind regards

    you want to loadPhoto as a static getter?

    public static void loadPhoto(_bmp:Bitmap):void {value}
    BMP = _bmp
    }
    public static function get loadPhoto (): Bitmap {}
    return bmp;
    }
  • Question related to the entrance with pci 6221 and SCC 68 analog

    I use 6221 PCI and SCC 68 analog read of voltage between the terminals of the drain and the source of a transistor. The drain is at 0 Volt and source is connected to 5 volts via a 100 k resistor. The transistor is used as a follower of the source, and therefore the output is measured at the source of the Terminal. When I measure the voltage by using oscilloscope, I see clearly the change of output as a result of change of voltage of the door. But, when I try to acquire the same by using labview, I see nothing. I tried to change the signal to the CSR, NRSE, but nothing works. Seems to be that something related to differences in impedance. Can you please advice me on this issue? Thanks in advance

    Hi rsd111,

    I understand that you measure a circuit similar to this ( http://en.wikipedia.org/wiki/Common_drain)

    I also get that you use an external power supply with GND connected to the Drain and - 5V connected to the Source with a 100 k resistor.

    You should be able to measure the tension between D and S setup a differential measurement and connection Ai0 + D and Ai0 - s, in fact you can youse Ain you prefer.

    You should be able to do the same measure also at configuration NRSE linking Ai0 AiSense at the Source and drain.

    The Board's input impedance is greater than 10GOhm, it must behave as the oscilloscope in pairing mode high-impedance DC.

    6221 specifications: http://digital.ni.com/manuals.nsf/websearch/8117DF4C5A29C95C862573020061023B

    Nice day.

  • Question related to the Xbox; Impossible to get Xbox live or to connect to the internet

    I've had my Xbox 360 for 4 years now and have recently decided to use it. I put in place when I was first, and for some reason any, I put the setting of family on it, I asked my parents if they did but they said no, so I thought I could have done myself but I don't remember the password or my security question and now I can not their and I can't get Xbox live or connect to the internet. I looked on the internet means that I could reset the Xbox or the parameters of the family, but they include all something on your hard drive but I don't have a hard drive, I also saw that if you put your age as 18 years as the family settings are enabled and you can find your access code in the settings , but I don't know where to find it. I would be grateful to anyone who helps to solve this problem.

    Try Xbox support:
    http://support.Xbox.com/en-us/

  • Updating from Home Premium to Ultimate... Questions related to the installation of SP1

    Hello

    I upgraded my system from Home Premium to Ultimate successfully by any time to upgrade. I have run the windows update and the updates installed. Now my Windows update says I have to install SP1...

    My windows update shows I need to install Windows vista service pack 1 kb936330 released 28/04/09

    I can goahead and install it? My hard drive does not support the function of bit locker and I already install the KB937287 , kb935509 kb938371 necessary updates and all other updates in windows update.

    If I install the SP1, I won't get the problem to enter the loop (stage 3 of 3 99% complete configuration) right. Coz, I already had this problem and reset my laptop to factory settings... Now I want to ensure, prior to SP1

    Last time I installed the SP1 from the following link and had the problem of configuration step 3 of 3 99% finished and restart loop

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=B0C7136D-5EBB-413B-89C9-CB3D06D12674&displaylang=en

    I hope that this is an old... Please let me know what are the precautions I need to take prior to the SP1 update... I don't want to see step configuring updates 3 of 3 99% finished and restart No. n times

    Thank you

    I upgraded my system from Home Premium to Ultimate successfully by any time to upgrade. I have run the windows update and the updates installed. Now my Windows update says I have to install SP1...

    My windows update shows Windows vista service pack 1 kb936330 released 28/04/09

    This I can goahead and install it?...

    Yes, you must install SP1... even just because SP1 is a sine qua non for the installation of SP2.

    It's okay which shows SP1 installed on 29 Apr-09: you haven't had not upgraded to Vista Ultimate then. ~ Robear Dyer (PA bear); MS MVP (that is to say, mail, security, Windows & Update Services) since 2002. DISCLAIMER: I do not represent nor don't work for Microsoft

  • Question related to the spam/hoax calls

    I frequently receive phone calls from an Asian voice claiming to be Microsoft support widows. He claims to have detected the virus and all kinds of horrible things on my computer. It will ask then as I turn my computer on and wait until the home screen is visible. It then asks me to press some buttons, which, out of suspicion, I refuse to do. I'm wrong. And if so, what might happen.

    Thank you in anticipation

    Bill

    Original title: am I paranoid

    Wednesday, January 21, 2015 16:17:35 + 0000, WilliamHolland1947 wrote:

    I frequently receive phone calls from an Asian voice claiming to be Microsoft support widows. He claims to have detected the virus and all kinds of horrible things on my computer. It will ask then as I turn my computer on and wait until the home screen is visible. It then asks me to press some buttons, which, out of suspicion, I refuse to do. I'm wrong. And if so, what might happen.

    Yes, you are right.

    It was a scam and with all the names and phone numbers, one who has
    become very frequent lately. See
    http://www.troyhunt.com/2012/08/virus-scams-social-engineering-victims.html
    and
    http://www.howtogeek.com/176605/tell-your-relatives-no-Microsoft-wont-call-you-about-your-computer/
    and
    http://www.howtogeek.com/180514/the-%E2%80%9ctech-support%E2%80%9D-scammers-called-Htg-so-we-had-fun-with-them/

    In addition to their money get on your part to do anything of any value,
    If you leave them in your computer, who knows what they were doing or where
    What confidential information they stole.

    So if you have done so, I highly recommend that you do both of the following
    immediately:

    1 do a clean reinstall of Windows.

    2. after reinstallation of Windows, change all your passwords.
    especially the banks or other
    financial sites.

  • Question related to the internet connection

    Hello

    MY NAME IS SANDY I'M SORRY THE BIG LETTERS I CAN SEE THEM BETTER. I HAVE A PROBLEM THAT NOTICING IN THE BAR DOWNSTAIRS, THE PIC OF MY INTERNET CONNECTION HAS AN X, BUT I'M ACTUALLY OK AND ABLE TO CONNECT TO THE NET. MY CONCERN IS THAT IT DOES NOT CONNECT TO MY NETWORK BUT HAS NEIGHBORS. HELP I'M WORRIED THAT MY PERSONAL INFORMATION MAY BE COMPROMISED. CAN SOMEONE HELP ME THROUGH AN EMAIL WITH HOW TO CONNECT TO MY OWN NETWORK. I THINK THAT I ASK THIS CORRECTLLY. IM HAS NO KNOWLEDGE OF REAL PUTER PERSON LIMITED BUT EAGER TO LEARN. I APPRECIATE NAY HELP AND THANK YOU IN ADVANCE.

    HANDYSANDY

    Sorry, what you ask is not possible via a forum because the person who assists you must have detailed information about your system that would be very difficult for a novice. Here are a few options for you to consider:

    -Ask a computer-savvy friend to help you.

    -Ask your service provider to help you. There will probably be a load.

    -Give a defendant remote access to your PC.

    The third option requires a difficult decision: How can you trust this meeting? Unfortunately I can't answer this question for you.

  • Memory problems and questions related to the process

    Does this look just for you, because the modified memory does little until after I had computer problems and had to do a factory reset

    The operating system is Windows 7 64-bit edition SP1

    I disabled SuperFetch is told by the way, if this help anyone on this issue.

    Resource monitor

    Windows process

    Services

    Performance

    Hello

    When your computer doesn't have enough memory for all the actions it is trying to perform, Windows and your programs can stop working. To help prevent information loss, Windows will inform you when your computer is low on memory. You can also learn to recognize the signs of low memory and take measures to prevent the problem. Insufficient memory problems occur when your computer is running out of RAM and becomes virtual memory. This can happen when you run more programs that the RAM memory installed on the computer is designed to support. Low-memory problems can also occur when a program free up memory that it needs more. This problem is called memory overuse or a memory leak.

    You can consult the following Microsoft articles and check if it helps.

    Diagnosing memory problems on your computer

    http://Windows.Microsoft.com/en-AU/Windows7/diagnosing-memory-problems-on-your-computer

    Prevention of problems of memory

    http://Windows.Microsoft.com/en-AU/Windows/preventing-low-memory-problems#1TC=Windows-7

    You may receive an "Out of Memory" error message because of the limitation of in Windows Vista or Windows 7 desktop heap

    http://support.Microsoft.com/kb/947246

    Note: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://windows.microsoft.com/en-US/windows7/Back-up-the-registry

    I hope this helps.

    Please post back with the State of the question and we will be happy to help you further.

  • Question related to the upgrade to Windows 8.1

    I currently have a HP laptop with 4 GB of Ram and 64-bit Windows 7 SR1 running. I'll give this computer to my wife, that his old bridge is going Tango-uniform (UT). I bought a new Lenovo SmartCheck S535 with 6 GB Ram 1 TB of storage. It came with Windows 7 SR1 already on board and he also included disks for Windows 8.1. First of all, I did a set of boot rescue disks and start them on the side.

    But now, I have a question, do I have to transfer my files from HP to Lenovo so that both use Windows 7 SR1? Or. should I go ahead and upgrade the OS and transfer the files.

    I'm sure that happens with a lot of people, there will be a lot of programs that I keep less re - install on the new computer. They are trash who are picked up along the way for those of us who use or service of computers as often we brush our teeth. Oops... maybe it's not such a great comparison, but you get what I mean!

    So, I would be very interested to hear your advice, your success, Yes and even a failure or two, all for the purpose of education.

    Thank you and I look forward to hearing from some of you.

    SteveG

    Original title: which came first - the chicken or the egg? (So to speak!)

    As a system dual boot, the only place where the 2 operating systems interact is the bootstrapper. Windows 8 will take the priority, is somewhat different, as far as it goes, and if you select then Windows 7 system reboots so it can do a little slower. Of course, there will be a loss of disk space but you are then also 2 installs of Office and everything else.

    If you were to go down the possibility to buy a kit Windows 8.1 you avoid the need to do a complete reinstall, because it will improve instead. You also avoid the need to run the upgrade of the store from 8 to 8.1. You must decide if the cost is justified, but in your situation, I would seriously consider that option as well.

    Even if I'm not a big fan of Windows 8 I made the full switch and are accustomed to him, I'm sure you will as well.

  • Question related to the extension of disk C

    Separated from this thread.

    Hey, I want to extend my C drive and have a lot of free space on my D drive, but the problem is my drive C is on disk 1 (TPG) and my D drive is on disc 2 (MBR) and I can't seem to transfer between the two discs... Anyone know if this is possible?

    Hi Stef,

    Thank you for visiting Microsoft Community to ask your question.

    MBR (Master Boot Record) and GPT (GUID Partition Table) are two ways to store the information of partition on a disk. You must convert the MBR to GPT or vice versa, then you would be able to share the space between them.

    For help, please refer to this link.

    Convert a disk from MBR in a GUID partition table disk

    http://TechNet.Microsoft.com/en-us/library/cc738416 (v = WS.10) .aspx

    Hope that the information provided is useful. Do not respond if you need more help.

  • SQL question, perhaps with the analytical functions?

    I have a small problem:

    I have a table with:

    DAY_ID, PAGE_ORDER, SID, TIME, CONTENT.

    I want only to the rank (min) of lines with the same content when there is more than

    the one with the same content that follows.

    The data are:

    DAY PAGE_ORDER SID TIMES CONTENT

    20150825 1 4711 25.08.15 06:38:43 / body/home

    4711 2 20150825 25.08.15 06:39:10 home, aufmacher, Home, 42303938

    20150825 3 4711 25.08.15 06:39:15 welcome, aufmacher, Home, 42303938

    20150825 4 4711 25.08.15 06:39:20 home, aufmacher, Home, 42303938

    20150825 5 4711 25.08.15 06:39:24 home, aufmacher, Home, 42303938

    20150825 6 4711 25.08.15 06:39:32 home, aufmacher, Home, 42303938

    20150825 7 4711 25.08.15 06:39:39 home/aufmacher/Home/42303938

    20150825 8 4711 25.08.15 06:39:46 welcome, aufmacher, Home, 42303938

    20150825 9 4711 25.08.15 06:39:49 home, aufmacher, Home, 42303938

    4711 10 20150825 25.08.15 06:39:51 home, aufmacher, Home, 42303938

    4711 11 20150825 25.08.15 06:41:17 pol/art/2015/08/24/paris

    20150825 12 4711 25.08.15 06:42:36 / body/home

    20150825 13 4711 25.08.15 07:06:09 / body/home

    20150825 14 4711 25.08.15 07:06:36 reg/article/memo

    I want as a result:

    20150825 1 4711 25.08.15 06:38:43 / body/home

    4711 2 20150825 25.08.15 06:39:10 home, aufmacher, Home, 42303938

    4711 11 20150825 25.08.15 06:41:17 pol/art/2015/08/24/paris

    20150825 12 4711 25.08.15 06:42:36 / body/home

    20150825 14 4711 25.08.15 07:06:36 reg/article/memo

    Who knows a good way?

    Thank you very much

    It sounds like a simple solution group. You group by content and maybe a few other columns such as the day and sid. So, you want to show some value of inside this group. Several different aggregate functions to do this.

    Not tested, because of lack of tabe create and insert scripts

    select day, sid, content
            ,min(page_order) as page_order
            ,min(times) as times -- if the first page_order also has the first time
            ,min(times) keep dense_rank first (order by page_order) as times2 -- this is needed in case the first page_order is at a later time
    from yourTable
    group by day, sid, content
    

    If Solomon is right, and several identical content may exist (the example data show that). Then we can use the Tabibitosan method to create the groups.

    with step1 as (select t1.*, row_number() over (partition by day, sid, content order by page_order) rn
                         from yourTable
                         )
    select  day, sid, content
             , page_order - rn as group_number
             , min(page_order) as page_order
             , min(times) as times -- if the first page_order also has the first time
             , min(times) keep dense_rank first (order by page_order) as times2 -- this is needed in case the first page_order is at a later time
    from step1
    group by day, sid, content, page_order - rn
    order by day, sid, content, group_number;
    
  • XWRITE using RELATIVE and the UDA functions

    Hello

    I need to write BSO planning data to cube HPCM BSO.

    I need the sum that the cost data of the members according to the UDA centres "85111010" and all the members of level 0 at a unique crossroads of HPCM. I executed the script below, but I'm not able to see the data in HPCM.

    Can I use

    Fix ("FY14", "DC", "May", "E72701")

    DIFFICULTY (@UDA ("Cost Center", "85111010"), @RELATIVE("A50000000_0000",0), 'LOW')

    "BUD".

    (

    @XWRITE ('BUD', _Alloc3C_,"BUD","[1_AllocAccount]@[85151010]","DirectAllocation","OverDrivenCost","[1_AllocCC]. [Impact] ',' [2_AllocCC]. [Impact] ',' [3_AllocCC]. [Impact] ',' [4_AllocCC]. [Impact] ',' [5_AllocCC]. [Impact] ',' [5_AllocCC_intra]. [Impact] ',' [2_AllocAccount]. [Impact] ',' [3_AllocAccount]. [Impact] ',' [4_AllocAccount]. [Impact] ',' [5_AllocAccount]. [Impact] ',' [5_AllocAccount_intra]. [Impact] ',' [1_Project]. [Impact] ',' [2_Project]. [Impact] ») ;

    )

    ENDFIX

    ENDFIX

    Do I need to use variables to store the values of top of page A50000000_0000 parent level. Please let me know.

    Thank you
    Vishal

    You can do the SUM of accounts / UDA in the expression (the first parameter @XWRITE).  According to the documentation, you should be able to place an expression that returns a numeric value.  Just put everything in a MESS doesn't work pas-@XWRITE each of these intersections will be seen as a cell separate to write to the target; He doesn't know you want to make the amount of them.

    What is the full dimensionality of the cube source and target?

  • question related to the shared pool

    Hi Experts,

    Version of DB - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

    OS - Windows 7

    (installed on my laptop)

    Just started reading concepts DBA. I had a few questions. Please explain indetail/short ;-).

    (1) can we see the size of the Cache of the library and Cache data dictionary which are internal units of the Shared pool.
    (2) one of the advantages of the package is - when we invoke a single method, oracle loads the whole package into the buffer and for subsequent calls, it will not go to the db files. Here the buffer means library Cache. My understanding is correct.
    (3) I am able to see the two parameters shared_pool_size(value =0), shared_pool_reserved_size (value 15099494) to parameter v$. What is the difference between these two parameters.


    Thank you very much in advance for your help.

    See you soon,.
    Suri ;-)

    Your questions:

    1 Yes, v$ sgastat

    2 Yes, if your terminology is a little loose.

    3. the parameters described here, content

Maybe you are looking for