Regular expression: numbers and letters allowed

How can i determine best way following: input string may contain only numbers and letters, letters can be from any alphabet.
Examples:
'123aBc' - correct, only numbers and letters
'123 aBc' - wrong, contains space
'123,aBc' - wrong, contains comma
'öäüõ' - correct, contains letters from Estonian alphabet.
'abc' - correct, contains letters from english alphabet.
I think i should use function "regexp_like" for that, because LIKE-operator can't do such things, correct?
How i should write the regular expression then? I'm new to reg expressions.

CharlesRoos wrote:
How can i determine best way following: input string may contain only numbers and letters, letters can be from any alphabet.
Examples:
'123aBc' - correct, only numbers and letters
'123 aBc' - wrong, contains space
'123,aBc' - wrong, contains comma
'öäüõ' - correct, contains letters from Estonian alphabet.
'abc' - correct, contains letters from english alphabet.
I think i should use function "regexp_like" for that, because LIKE-operator can't do such things, correct?
How i should write the regular expression then? I'm new to reg expressions.I'm not too hot on the foreign alphabets, but something like:
regexp_like(txt, '^[[:alpha:][:digit:]]*$')should do it I think.

Similar Messages

  • Boxes with numbers and letters show instead of certain images on some websites

    On yammer.com and linkedin.com, images for icons, like those that should display along the top of the screen do not display. Instead, I see a rectangle with numbers and letters. I've seen quite a few articles about the rectangles with numbers and letters that apply to characters but none involving images. I've also tried the steps in the article on troubleshooting images not displaying properly, and nothing seems to work.
    Thanks!

    Make sure that you allow pages to choose their own fonts.
    *Tools > Options > Content : Fonts & Colors > Advanced: [X] "Allow pages to choose their own fonts, instead of my selections above"

  • Pop-up Menu with numbers and letters

    When using a pop up menu i only have numbers in there e.g. $50. What i want to have in there is 3hrs instead of $50 because that's what will be relevant but
    the formula sees 3hrs as $50 so the spreadsheet still works. If i add letters eg $50 = 3hrs I get the following error message
    It would be great if its could say 3hrs instead of $50  4hrs instead of $70  5 hrs instead of $80
    Hope that all makes sense and someone can help me
    Many thanks
    Danny Kirk

    Hi Danny,
    When you put a mixture of numbers and letters into a cell, Numbers treats it as a (text) string. The arithmetic operators ( +, - * and / ) work only with numbers, duration values, and Date & Time values. You are getting an error because a formula using the value placed in the cell by the pop-up menu expects a number, but you have given it a (text) string.
    You can supply the operator with the number 50, formatted as currency ( $50 ), or you can provide a duration ( 3h ). If you place the operator into a formula that can use the type of value you choose, you will not get the error message.
    There does not appear to be a linear relationship between the number of hours and the number of dollars. Unless you can specify a relations ship that can be expressed mathematically, you will need to use a lookup table to match the hour values in the pop-up's menu to the related dollar value to be returned.
    Here's a simple example. Note that "3h" (without the quotes) as used in SGIII's example above is a Duration value, "3hrs" (again without the quotes) will be interpreted by Numbers as a duration, and will be automatically reformatted to display as "3h". The dollar amount has been entered (and displayed) as a number. The Amount column on the Main table has been formatted as Currency, with the default two decimal places.
    The formula in each cell of Main::Column A is: =LOOKUP(B,Lookup :: A,Lookup :: B)
    (LOOKUP is the name of the function used. "Lookup" is the name of the table from which the information is retrieved.)
    Regards,
    Barry

  • New user. cannot input start up code because keyboard will only let me use numbers only.  Since the code requires both numbers and letters, I'm not able to complete the code and install the program

    I need to do the finial step to activate elements 12. For some reason my keyboard will not allow me to print letters, only numbers. Since the code that is required for the final step requires both numbers and letters I'm not able to complete .

    If the code has letters it's not a serial number, but  a redemption code that you use to get a serial number:
    Redemption Code Help

  • Can't validate outlook on iPad - random numbers and letters don't display - only a question mark in a blue box

    If I have to validate Outlook on PC or Mac - I have no problem - the random numbers and letters display fine - but if I am requested to validate outlook before sending a mail when using my iPad, the operation fails as the test numbers and letters are not shown - only a snap blue box with a question mark.  How do I convert the box into the image of a new validation code?  Thanks in advance.

    Hello,
    The question mark means it can't find it where it was when you put it in the Dock.
    I'd get EasyFind...
    http://www.macupdate.com/info.php/id/11076
    Use it to search your whole drive for Files & Folders, case insensitive & show invisibles...
    Complete
    That will show any with that word in the name at all.

  • Has had 2 iTunes gift cards and the scratch off strip on the back leaves us unable to read the numbers and we can not retrive anysongs without the correct numbers and letters. What can we do? Please help...

    Has had 2 iTunes gift cards and the scratch off strip on the back leaves us unable to read the numbers and we can not retrive any songs without the correct numbers and letters. What can we do? Please help...

    iTunes Store: Invalid, inactive, or illegible codes

  • Iphone slow to type numbers and letters since downloading ios7

    iphone slow to type numbers and letters since downloading ios7

    RAB7228 wrote:
    iphone slow to type numbers and letters since downloading ios7
    There have been scattered reports of this problem. First try Ralph's solution, as the easiest. Next, try clearing memory by killing processes - double-press HOME, then flick each mini-page up. If it still not fixed Settings/General/Reset - Reset All Settings has been reported to be the solution by several people. Axeman's suggestion is also a good one, but is time consuming if you have a lot of content.

  • The Regular Expression anchors, "^" and "$" do not work for me in Dreamweaver

    I am using the Find and Replace feature of Dreamweaver 8 and especially the "Use Regular Expressions" setting.  But I have never been able to make the Regular Expression anchors "^" and "$" work at all.  This are supposed to fix a match at the beginning or ending of a line or input.  But if I search even something as elementary as "^ ", or " $", it can't seem to find them.
    Am I missing something?  Can somebody give me an example of this working?
    Any and all tips or clues would be appreciated.

    Welcome to Apple Discussions and Mac Computing
    Definitely an E-bay issue. The coding on the page is not Safari-friendly. Firefox, as you discovered, in this instance is the better choice.

  • I am trying to download iTunes on to my laptap but I keep getting a "Could not open key: UNKNOWN\Components\ with a bunch of numbers and letters following.  I have uninstalled all the iTunes programs. I changed the Regedit but I still get the error?

    I am trying to download iTunes to my laptop but I keep getting this "Could not open key: UNKNOWN\Components\ followed by a bunch of numbers and letters.  I have unistalled iTunes and all the other apple componants.  I also used followed this http://discussions.apple.com/docs/DOC-3581. But I am still getting the same "Could not open key:" error and it tells me that iTunes could not download.

    On occasion, when changing ownership or permissions has no effect on the UNKNOWN\Components\ error, the fixit from the following Microsoft document sometimes works:
    Fix problems with programs that can't be installed or uninstalled

  • I am now using the free 1 month CC trial. I got a free one year licence with a camera. I have a product key 24 characters long with numbers and letters. I can't find anywhere to put this key to activate the account? Using a PC, windows 8.

    I am now using the free 1 month CC trial. I got a free one year licence with a camera. I have a product key 24 characters long with numbers and letters. I can't find anywhere to put this key to activate the account? Using a PC, windows 8.

    Redemption Code Help
    Mylenium

  • TS1398 The WEP password to access WiFI from Time Warner is 12 numbers and letters plus 14 zeros.  Can I expand the available space in the space for entering passwords

    The WEP Password to access wifi from Time Warner cable is 12 numbers and letters followed by 14zeros.  The available space to input password is unequal to the task?  Time Warner advised to call Apple.  Any one with a suggestion on how to either 'customize' WEP or expand available password input space?  Better ideaS?

    wjosten - I was using a WEP password of greater than 13 characters with no problem.
    Mondayblues - Are you saying that you cannot set your own password for your router/modem? You should be able to access it from an ethernet connected computer and change the password to suit yourself.  If it's not more than about 4 years old, you should be able to use WPA instead of WEP, which is much more secure.  Google "time warner modem  yourmodel" to find the user manual and the URL to access the modem.

  • Chapter Numbering (combining numbers and letters)

    Is there a way to create a book with module numbering that has a number and a letter.
    For example:
    Module 9: Family Room Make-Over
    Module 9A: Selecting a Paint Color
    Module 9B: Selecting a Flooring Style
    Module 9C: Selecting Furniture
    Module 10: Kitchen Make-Over
    Module 10A: Selecting Cupboard Style
    Module 10B: Selecting a Counter Top
    I'm currently using a building block of <chapnum> that automatically numbers the modules in a book. This information also updates the footer information for the page numbers (example: 9-1, 9-2, 9-3, etc.)
    I would like to add a letter with the number as shown in the example above (9A, 9B, 9C, etc.) for some of the modules.
    What is the easiest way to do this? Is there a way to automate the book build to get the 9A, 9B, 9C for some modules?
    Any help is much appreciated.
    Dennis

    Dennis:
    I'm not really in the Help Desk business, and the advantage of posting here is that someone else might benefit from the exchange (I've often solved my own FM problems by looking at answers to other people's questions here). If the suggestion Thomas provided isn't working for you, though, I'm somewhat at a loss as to what to say: His approach is exactly what I would've suggested.
    It might be helpful to establish some parameters: I assume you're broadly familiar with FrameMaker's autonumbering properties? Just to clarify, it's the part of each line of Thomas' example that begins with
    i N:
    that matters. That label (which could be any single capital letter; there's no special significance to N), followed by a colon, followed by the building blocks for the numbers and letters, all goes in the "Autonumbering Format" field of the "Numbering" tab in the Paragraph Designer. Actually, looking back at your original post, it seems you want the word "Module" at the beginning of the heading and a colon after the number. Thus, the complete autonumbering format for the top-level heading (let's say you call that paragraph tag
    i Heading1
    ) should read:
    i N:Module\ <n+>< =0>:\t
    ...where
    i N:
    is just a label that identifies this numbering sequence (so it's possible to have more than one sequence in the same document without interference); the word "Module" and the following nonbreaking space (\[space]) are simply text that will appear in the paragraph autonumbering;
    i <n+>
    is a numerical counter that increments with each new instance of the paragraph;
    i < =0>
    (and note the space before the equals sign) is a placholder that sets the value of the second numbering position to zero, but doesn't display anything; and
    i :\t
    is the colon at the end of your autonumber and a tab character to separate the autonumber from the paragraph text (presuming you want to use a tab, that is; this could just as easily be a space or nonbreaking space).
    The autonumbering sequence for the subordinate heading (call it
    i Heading2
    ), would be similar:
    i N:Module\ <n><A+>:\t
    ...the difference being that the first counter now returns the same number as the heading above, but doesn't increment, and the second counter returns a capital alpha character whose equivalent numerical value (i.e., 1=A, 2=B, etc.) is the value of the heading above plus 1.
    Note that you could replace the first counter in both autonumbering formats with
    i <$chapnum>
    , as long as you make sure the chapter number is correctly defined for each file in your book. Either way, you'll get the following results:
    [First paragraph tagged
    i Heading1
    in book] -->
    b Module 1:
    [Heading Text]
    [Second paragraph tagged
    i Heading1
    in book] -->
    b Module 2:
    [Heading Text]
    [First paragraph tagged
    i Heading2
    under Heading1] -->
    b Module 2A:
    [Heading Text]
    [Second paragraph tagged
    i Heading2
    under Heading1] -->
    b Module 2B:
    [Heading Text]
    ...and so on. Once you've set it up this way, the building block
    i <$paranum[Paragraph Tag]>
    will return the whole autonumbering string, including text and punctuation, and
    i <$paranumonly[Paragraph Tag]>
    will return only the values of the counters.
    So a cross-reference format for referencing these headings by number and heading text might look like:
    i <$paranum>\ <emphasis><$paratext><Default ¶ Font>\
    ...and would show up in text as "...this topic is discussed in more detail in
    b Module 2A:
    i Framistat Synchronization
    in the next chapter."
    To get page numbering at the Heading2 level, you would define one of the user-definable header/footer variables (e.g.,
    i Running H/F 3
    ) as:
    i <$paranumonly[Heading2]>
    ...and then include that variable in a header or footer on your masterpage:
    i Running H/F 3-<$curpagenum>
    (note that the page number building block will show up as
    i #
    when you insert it). As I said before, you can (AFAIK) only restart the page numbering to 1 at the beginning of a new file, so you'll have to divide the book into files at the same outline level at which you want to page number.
    Hope this makes it all clear and specific; if this still doesn't work for you, you'll need a better guru than me to take this further.
    -Bill

  • Regular Expressions, include and exclude xml-files

    Hi!
    I have a javaprogram that should read xml-files from a directory. The program could contain several types of files but it should only read files with a certain pattern.
    The file names will look like this:
    "resultset_27_23.xml"
    where the numbers will change, but the rest of the file name is the same (resultset_XX_XX.xml).
    But in the same directory it will also be files with the following pattern:
    "resultset_27_23_attachment1.xml"
    Here, the numbers could change in the in the same way as the files above, and the number after the text (attachment) could also differ from file to file.Those files should not be read by the program.
    I have tried to write a regular expression pattern that only reads the first file types, and exlcudes the other ones, but it won�t work.
    Does anyone have a solution to my problem? It is possible to use either just one pattern, or two patterns; one for the files that should be included, and one for the files that should be excluded.

    So you only want files that match resultset_XX_XX.xml? Will the numbers always be two digits each? Assuming so:
    "^resultset_\\d\\d_\\d\\d.xml$"Depending which methods you use, the ^ and $ may or may not be necessary.
    If that's not what you meant, please clarify.

  • Regular Expressions - Logical AND

    I know this isn't Java, and it's not really an algorithm, but I can't figure this out. I hope amongst this bright group of developers someone can help me.
    I am searching for a regular expressions that will match a series of words.
    Example:
    Given the words: "ship book"
    What regular expression could be used to find both the word "ship" and the "book"?
    I have found one expression that will do it ... ship.*book|book.*ship
    But that expression doesn't scale. Does anyone know of a better way?
    Thanks,
    BacMan

    Hi,
    How about something like:
    public class Regexp1
       private static final Pattern all = Pattern.compile(
             "^(\\s*\\b(monkey|turnip|ship|book)\\b\\s*)*$" );
       private static final Pattern p = Pattern.compile(
             "\\s*\\b(monkey|turnip|ship|book)\\b\\s*" );
       public static void main( String[] argv )
          find( "ship book turnip monkey" );
          find( "monkey giraffe mango" );
          find( "ship shipship ship" );
       public static void find( String text )
          System.out.println( "Text: " + text );
          Matcher m = p.matcher( text );
          System.out.println( "Matches all: " + all.matcher( text ).matches() );
          while ( m.find() )
             System.out.println( "Matching word: '" + m.group(1) + "'" );
       }which will produce this when run:
    Text: ship book turnip monkey
    Matches all: true
    Matching word: 'ship'
    Matching word: 'book'
    Matching word: 'turnip'
    Matching word: 'monkey'
    Text: monkey giraffe mango
    Matches all: false
    Matching word: 'monkey'
    Text: ship shipship ship
    Matches all: false
    Matching word: 'ship'
    Matching word: 'ship'Pattern all tests to see if all the words are present.
    Pattern p finds each matching word and ignores others.
    Ol.

  • Regular Expressions find and replace

    Hi ,
    I have a question on using Regular Expressions in Java(java.util.regex).
    Problem Description:
    I have a string (say for example strHTML) which contains the whole HTML code of a webpage. I want to be able to search for all the image source tags and check whether they are absolute urls to the image source(for eg. <img src="www.google.com/images/logo.gif" >) or relative(for eg. <img src="../images/logo.gif" >).
    If they are realtive urls to the image path, then I wish to replace them with their absolute urls throughout the webpage(in this case inside string strHTML).
    I have to do it inside a servlet and hence have to use java.
    I tried . This is the code. It doesn't match and replace and goes inside an infinite loop i.e probably the pattern matches everything.
    //Change all images to actual http addresses FOR example change src="../images/logo.gif" to src="http://www.google.com/../images/logo.gif"
              String ddurl="http://www.google.com/";
    String strHTML=" < img src=\"../images/logo.gif\" alt=\"Google logo\">";
    Pattern p = Pattern.compile ("(?i)src[\\s]*=[\\s]*[\"\']([./]*.*)[\"\']");
    Matcher m = p.matcher (strHTML);
    while(m.find())
    m.replaceAll(ddurl+m.group(1));
    what is wrong in this?
    Thanks,
    Rajiv

    Right, here's the full monte (whatever that means):import java.util.regex.*;
    public class Test1
      public static void main(String[] args)
        String domain = "http://www.google.com/";
        String strHTML =
          " < img src=\"images/logo.gif\" alt=\"Google logo\">\n" +
          " <img alt=\"Google logo\" src=images/logo.gif >\n" +
          " <IMG SRC=\"/images/logo.gif\" alt=\"Google logo\">\n" +
          " <img alt=\"Google logo\" src=../images/logo.gif>\n" +
          " <img src=http://www.yahoo.com/images/logo.gif alt=\"Yahoo logo\">";
        String regex =
          "(<\\s*img.+?src\\s*=\\s*)   # Capture preliminaries in $1.  \n" +
          "(?:                         # First look for URL in quotes. \n" +
          "   ([\"\'])                 #   Capture open quote in $2.   \n" +
          "   (?!http:)                #   If it isn't absolute...     \n" +
          "   /?(.+?)                  #    ...capture URL in $3       \n" +
          "   \\2                      #   Match the closing quote     \n" +
          " |                          # Look for non-quoted URL.      \n" +
          "   (?!http:)                #   If it isn't absolute...     \n" +
          "   /?([^\\s>]+)             #    ...capture URL in $4       \n" +
        Pattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.COMMENTS);
        Matcher m = p.matcher(strHTML);
        StringBuffer sbuf = new StringBuffer();
        while (m.find())
          String relURL = m.group(3) != null ? m.group(3) : m.group(4);
          m.appendReplacement(sbuf, "$1\"" + domain + relURL + "\"");
        m.appendTail(sbuf);
        System.out.println(sbuf.toString());
    }First off, observe that I'm using free-spacing (or "COMMENTS") mode to make the regex easier to read--all the whitespace and comments will be ignored by the Pattern compiler. I also used the CASE_INSENSITIVE flag instead of an embedded (?i), just to remove some clutter. By the way, your second (?i) was redundant; the first one would remain in effect until "turned off" with a (?-i). Another way to localize a flag's effect by using it within a non-capturing group, e.g., (?i:img).
    As jaylogan said, the best way to filter out absolute URL's is by using a negative lookahead, and that's what I've done here. The problem of optional quotes I addressed by trying to match first with quotes, then without. The all-in-one approach might work with URL's, since they can't (AFAIK) contain whitespace anyway, but the alternation method can be used to match any attribute/value pair. It's also, I feel, easier to understand and maintain. Unfortunately, it also means that you can't use replaceAll(), since you have to determine which alternative matched before doing the replacement, but the long version is still pretty simple (especially when you can just copy it from the javadoc for the appendReplacement() method, as I did).

Maybe you are looking for

  • 24 Inch Imac frequent Kernal Panics / Shutdowns. Please help

    Hey there ; looking for some advice from an experienced mac person. I'm clueless here. Imac 24 inch 3.06 Core duo 4gb ram Geforce 8800 GS 1TB Hitachi HDD When opening new applications, mild multi tasking or even sleeping Imac has been crashing. I bac

  • Many iTunes account using one Credit card

    We have purchased 15 iPad for Sale staff and would like to install a set of apps (which are purchased from company iTunes account)on all these iPad but we still allow these staff manage their own photos, music, video and they can even purchase other

  • Phone Car Mounts for Frequent Traveler / Rental?

    http://www.proclipusa.com

  • Compatibility between Oracle Developer suit and application server

    Hello We are going to user oracle 10 to develop and deploy our application. The tool that we were going to use are Developer Suite 10g Release 2 (10.1.2) and Oracle Application Server 10g Release 3 (10.1.3.2.0) But i need to know whether this are com

  • Tapatalk app use on these forums

    I'm considering purchasing the Tapatalk app for my iPhone 4S, but I'm unsure has to if it will work on this forum (Apple Discussions forum). I noticed that there are a couple of posts on this subject already but these were a while back and wondered i