Regular expression - search

Hello

I'm trying to filter my dataset using the term regular regexp_like, but it does not succeed me.

I have a group of data, where I have names in the column. (Varchar2)

I need only to print lines that ends with (line of underscores and digits) or without (underscore and digits).

But the number of digits must be between 1 and 2.

How could I do?

Thanks in advance.

Hello HansJ

It would be good that you provide information on your version of oracle and your test values!

But maybe it's a solution:

SELECT x_tab_name

FROM (SELECT 'TAB_1' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB_12' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB_12345' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB_' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB_NO' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TAB_XX' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT 'TABNOTTOPRINT' AS X_TAB_NAME FROM DUAL UNION ALL

SELECT "NOTTOPRINTTAB" AS THE DOUBLE X_TAB_NAME

)

WHERE REGEXP_LIKE(x_tab_name, ' ^ TAB(_[[:digit:]]{1,2}$|$)')

;

X_TAB_NAME

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

TAB_1

TAB_12

TAB

SQL >

Kind regards

David

Tags: Database

Similar Questions

  • Regular Expression search and replace question - please help!

    I was wondering if someone could help me I have a lot of paper with notes like this: [1], but I need them to look like in this [1].

    I don't know what to put in the section find [[\d]*] , but I need help with what to put in the field replace to make < sup > numbers]

    In fact, your regular expression is false. What you need is the following:

    (\[\d+\])

    The field replace must contain this:

    $1

  • Indexing on search for regular expression for dynamic model

    Hi all

    Is it not possible to create an index for the regular expression search (REGEXP_LIKE) for the model 'dynamic '?

    If the model is static, we can create FBI, but is it possible for dynamic diagrams? Please notify.

    Kind regards
    Hari

    N °
    The best option is an Oracle text index.
    http://download.Oracle.com/docs/CD/E11882_01/text.112/e16594/TOC.htm

  • Are there reasons why T/B could not support wildcard (* xyzpqr *) or regular expressions in search of content of e-mail?

    When a string of characters, I'm interested, is buried in an e-mail, I would find these emails. It seems that as the code needed to find an email is already in place, it would take very little effort/code/support added to extend the search capabilities of more effectively, as it is available in spreadsheets.

    This particular forum has these capabilities, suggesting that users find useful installation.

    Are there reasons preventing these facilities being added to T/B? I find that the ability would frequently help me in search of my email.

    FiltaQuilla both Expression search/GmailUI provide functionality, specifically the regular expressions.

    FiltaQuilla aims to improve the message filters and has a useful side effect in improving the CTRL + SHIFT + f find. Research of expression increases the QuickFilter bar. Or rather weird global research assistance, but I work around this by using a Saved Search folder, where you use a dialog similar to the message filters and can make use of the enhancements offered by one of these modules.

  • Can I do regular expressions or Boolean logic in the search?

    Can I do regular expressions or Boolean logic in the search? (Windows + F) Suppose I want to search pdf files or text files. I can go * .txt | * .pdf?

    I searched for about an hour for a simple answer to this and this is the closest, I came, but it still not answering the question.

    Can I use expressions simple boolian in instant search and if yes what are.

    I think that AND and WOULDN'T cover 90% of what I want.

    I want to search for emails for things such as [Minutes AND project x]

    Currently, this property returns all the messeges with minutes and all messages with project x.
    Since I have minutes of many projects, and many emails with project x not the minutes that returns are many.   I would use a simple AND to get the intersection.

    If and expression exist, I have found no reference to it.

    According to me, the back had these expressions in the search function.

    Thank you

  • CS6 - error in search: Syntaxerror in regular expression: invalid quantifier ++

    Hello

    I get an error when you search for a string containing ++ in Dreamweaver on Mac OS X 10.9.1 CS6.

    The error message reads:

    SyntaxError in regular expression:

    invalid quantifier ++

    Same error when I search a +.

    No search no results when I search open + without, but there are two in the source code...

    What's not here? What can I do? Thank you.

    Michael

    OK, it is resolved: there was an option selected by default in the search box: use regular expressions. Unchecked this and it works...

  • Use matching of regular expressions to search for parentheses

    Hi all

    I am currently looking for a particular pattern in a string, I can't display the exact string, but say its something like that.        corresponds to regular_pattern (5000): 0

    I'm also looking for the a different model at the same time, so I have to use the corresponding regular expression and the | function.  I can't understand how to match this model because the regular expression function allows parentheses unless I put them in the legs, and that does not help me for this.

    Any advice?

    Thank you

    Matt

    Have you tried to escape the bracket?

  • Search for a string using "Game Plan" or "Regular Expression to Match."

    Hello

    I would use the 'game plan' or the vi "Expression regular game" simply because the products that provide these vi. The result that interests me is the substring 'after '. I want to be able to specify a "substring" and get everything after the substring of the input string. However, I'm getting all confused and/or watered upward when it comes to "regular expressions". Is there a way to create a "regular expression" which acts as a 'substring' to find within the input string?

    The substring is a path of partial directory that contains a colon, backslashes, etc. which are part of a directory path.  If some how the "regular expression" entry must ingnore all special characters and simply to understand if the substring in the string entry and give me 'all things' after the substring in the output of 'after the string.

    Use Regular Expression Match instead of match pattern; It's better.

  • Set-search-data-hiding-rule-prop-dn-regular-expressions setting targets

    Hello. I'm trying to put in place a masking rule 6.3 DPS data. I want to have the data masking rule apply to any DN that ends with o = ny, c = us. I tried to adjust the target-dn-regular-expressions to ' o = ny, c = us$ '. I thought that if DPS used regular expression match, the $ at the end should serve as an anchor for this channel. But the rule is not fired. I proved it by assigning the expression regular votes to zero and then the target dns to exactly match the dn I'm back. Anyone know what I need to put in the phrase correspond to what I want? Thank you

    Hello

    Regular expressions must comply with the Java regular expression specificationa, available on [http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html]

    For example, the regular expression (. *) c = us, o = ny filters out all o = ny, c = us tree.

    Hope this helps

    Sylvain

  • RESOLVED: Understand regular expressions in search and replace - use it to replace everything between two comments

    I solved this by using the following regular expression in find DW and replace dialogue, it will be all the html on several lines between two specified comments:

    <!-NameofStartingComment--(.| \s)*?--NameofEndingComment-->)




    Hello

    I have structured my site in dreamweaver with each page between the comments section:

    <! - navBarStart - >
    HTML here
    <! - naveBarEnd - >

    I used this method because I wanted to be able to easily use the find and replace dialogue with regular expressions to update pieces of code throughout my site. However, I have real problems finding the correct regular expression to use.

    So in every page I have my <! - startHtmlSection - > <!-endHtmlSection-> between these two tags, I sometimes have different HTML. I want to find the regular expression I could use 'generic' of all the html to a find a replacement between two of my comments specified. Can anyone help? I googled and tried everything what is obvious (after you have selected the regular expressions in the find and Replace dialog) but DW never find the tags in the pages of sites.

    I solved this by using the following regular expression in find DW and replace dialogue, it will be all the html on several lines between two specified comments:

    Hello

    I have structured my site in dreamweaver with each page between the comments section:


    HTML here

    I used this method because I wanted to be able to easily use the find and replace dialogue with regular expressions to update pieces of code throughout my site. However, I have real problems finding the correct regular expression to use.

    So in every page I have my between these two tags, I sometimes have different HTML. I want to find the regular expression I could use 'generic' of all the html to a find a replacement between two of my comments specified. Can anyone help? I googled and tried everything what is obvious (after you have selected the regular expressions in the find and Replace dialog) but DW never find the tags in the pages of sites.

  • regular expression

    According to the link below, TS supports regular expressions.  Can anyone provide an example where to write regular expressions?

    I might be easier to do via a plug-in of .net, but TS permitting, I might go with it.

    http://zone.NI.com/reference/en-XX/help/370052N-01/tsref/infotopics/find_regular_expressions/

    Hello

    Yes, there is a member of the PropertyObject.Search, but the result is search results, so I wonder how to use in the execution sequence?

    What a simple solution using only 4 lines in Exression statement to realize this split and trim?

    Concerning

    Jürgen

  • Looking for the character "$" in a regular expression

    I try to use the vi "Regular Expression to Match", but what I'm trying to find is a dollar sign followed by a space.

    Using the slash codes allows me to specify a whitespace character (\s) but I can't find how to specify the $.

    I tried \x24 and \36 try hex and decimal ASCII representations, but no luck, I tried to put the $ hooks - but which doesn't work either.

    Everything I try, the $ is interpreted as a command rather than the search term.

    I used to use model game (legacy code) and the search term "$\s*$ ' worked - now need to use regex that I need to feed in some other matches this regex only can do - except for the dollar (if only I worked in the good old UK £!)

    Any ideas out there?

    Thank you

    I think that we must work...

    \\$\s[\n\r]

    seems to do the trick

  • Allow specific characters - Regular Expression

    Hello everyone

    I am new to the regular expression and I have a very simple question. I use the function "read from the text file" to load a file delimited by tabs with 3 columns in my VI. Then, the string is converted to table and I use the values.

    Nevertheless, I would like to develop a "filter" that allows only digits (0-9), colon, comma , and point to strings.

    Using the function "matches regular expression", I tried a regular expression like this:

    [^ 0-9] | [^\]. [|^:]| [^,]

    But it does not work.

    Could someone help me with this problem?

    Thank you

    Dan07

    Use search and replace with regular Expression String selected.

  • Use regular expressions to extract .llb file from the path name

    I'm trying to be smart (always a dangerous thing) and use a regular expression to extract the name of a library to a filepath converted to a string.   While I appreciate there are other ways to do this, regex seems to be a very powerful way of neat, I would be able to operate.

    IE, if I have a string of type, C:\applications\versions\library.llb\toplevel.vi, I want to be able to extract the library.llb of the string, because it will be of variable length, may include the numbers & spaces and may be located in a file of variable depth hierarchy.   In other words, I want to extract the part of the string between the last-which ends with .llb

    The best I managed so far is \\+.*llb who all returned less the drive letter and the toplevel.vi

    Can someone help me to achieve this goal, or I'm better by using an alternative method (for example filepath string in array, search for .llb)

    Thank you

    Matt

    Hi Matt,

    attached you will find two other options.

    Mike

  • problem of regular expression with brackets

    Hello

    I have a Zebra printer string that contains tokens that I want to search.

    ^ BY2, 3, 55 ^ FT50, 219 ^ BCN, Y, N... ^ FD >: [[number 1]] ^ FS
    ^ BY2, 3, 55 ^ FT525, 221 ^ BCN, Y, N... ^ FD >: [[serial number 2]] ^ FS
    ^ FT170, 192 ^ XG000. GRF, 1, 1 ^ FS
    ^ FT220, 430 ^ A0N, 27, 27 ^ FH\ ^ ea FD2. #00931 drum kit / ^ FS
    ↑ FT350, 460 ^ A0N, 27, 27 ^ FH\ ^ FD #00602 ^ FS
    ^ FO10, 32 ^ GB780, 480, 8 B, 1 ^ FS
    ^ FT720, 500 ^ A0N, 10, 10 ^ FH\ ^ FD [[Date Code]] ^ FS

    I want to find any instance of double hooks regardless of the bracketed text. I find [[SerialNumber 1]] for example, but I also want to analyze the entire string and ensure that there no case [[text]] left in the string. I was not able to build a regular expression that will find them.

    Hi elrathia,.

    Please find below screenshot

    Kind regards

    SrikrishnaNF

Maybe you are looking for

  • Skype

    I know my pasword and Skype name but when I'm in writeng not been recnizf

  • S440 - M.2 length (SSM / SSD)

    Hi people, I recently bought a S440 and would like to add a SSM (m2) now to install the top OS. Unfortunately, I am not able to find an answer on the duration of the SSM (2242, 2260, 2280). Anyone is able to provide me with this detail or may refer t

  • serious discs will not play on the cd player or car drive?

    When I burned a cd of music with windows media player, the disc will not play on my cd player or car player! Help!

  • Buying a server - no help - where is the customer service?

    Hey guys, I'm a looking for a server for the enterprise network engineer, that I work. I have been trying to decide on the right server for my project and was looking for a little help to get the right plug. I tried to use your live chat twice and go

  • How to open the video player

    Hi all In my application I need to play videos from Youtube, I wrote code like this Private private = Browser.getDefaultSession ();browserSession.displayPage (_vurl); Initially, it is to show the video and once more the user must click on this video