Searching ASCII ranges in a string.

I was wanting to know if it was possible to find all ASCII values higher than 127 DECmal within a string of characters.
example table
table a
cust_id Example String
111111 My name is Bob and I have 100 pounds <-- nothing above 127 DEC
111112 My name is Carol and I have 200 pounds <-- nothing above 127 DEC
111113 My name is James and I have £1 <-- the pound sign is ascii 157 DEC
my ideal output would be, simply to return the cust_id i.e. 111113
Is this possible?

What database version? You have more/easier options in 10g and above than in earlier releases:
select dump('abcZ') from dual;
select cust_id
     , example
     , regexp_instr(example, '[^'||  --Match any charater not in the following range
                             chr(1)||--First Character in range
                             '-'||  
                             chr(127)||--Last character in range
                             ']') location
  from A
where regexp_like(example, '[^'||  --Match any charater not in the following range
                             chr(1)||--First Character in range
                             '-'||  
                             chr(127)||--Last character in range
                             ']');

Similar Messages

  • How to search special characters in a string

    Hi all,
    I want to search special characters in all string columns and all rows in the table.
    The table has about 5 string columns and about 5.000.000 rows. For each row and column, I have to search entries, which included special characters like ", !, ? or something else (f.ex. "Mama?Mia" or "!!!Hotel out of order!!!"). The problem, the character could stand at each position in the string.
    What's the best and most performance possibility to search such entries?? Is it possibility only by SQL; is there a special function for this?? Or must I use PL/SQL.
    Thanks for helping
    Dana

    HTH
    Laurent Schneider
    OCM DBA
    SQL> select * from z;
    S
    Mama?Mia
    a b c
    123
    SQL> select * from z where translate(s,'~ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz1234567890','~') is not null;
    S
    Mama?Mia
    SQL> select * from z where regexp_like(s, '[^[:alnum:][:space:]]');
    S
    Mama?Mia

  • Tell me Logic for search for duplicate words(or strings) in a large file.

    Search for duplicate words (or strings) in a text file containing one word per line. For each word that occurs more than once in the flat file output should be as follows
    <word> <number of occurrences> <line numbers in the file where the word occurs>
    For example, if the word Hello occurs thrice in a file at lines 100, 178 and 3456 the output should read
    Hello, 3, [100, 178, 3456]

    Incidentally i wrote similar code some days back. You need to do some modifications to get the exact output you want, but i hope it will be of some help.
    One more thing its written using JAVA5
    public class Test
         private static final String COLLECTIONS_TEXT = "C:\\Documents and Settings\\amrainder\\Desktop\\Collections.txt";
         public static void main(String[] args) throws IOException
              findDuplicateWords();
         private static void findDuplicateWords() throws IOException
              Collection<String> words = new LinkedHashSet<String>();
              File file = new File(COLLECTIONS_TEXT);
              StreamTokenizer streamTokenizer = new StreamTokenizer(new FileReader(file));
              int token = streamTokenizer.nextToken();
              while(token != StreamTokenizer.TT_EOF)
                   if(token == StreamTokenizer.TT_WORD)
                        words.add(streamTokenizer.sval);
                   token = streamTokenizer.nextToken();
              System.out.println(words);
    }Cheers,
    Amrainder

  • Searching for numbers in a string

    I am trying to filter passwords stored in a string variable and ensure that they contain at least a number and one capital letter.
    how do you search for numbers in a string and search if that string contains a character in uppercase?

    function checkString(username){
    var userfield = username;
    var valid = '0123456789ABCDEFGHIJKLMN�OPQRSTUVWXYZ'; // define valid characters
    if(!isValid(userfield.value,valid)){
    alert("Invalid user name format");
    userfield.value="";
    userfield.select();
         userfield.focus();
    }else{
    err = 0;
    userfield = userfield.value;
    function isValid(string,allowed) {
    for (var i=0; i< string.length; i++) {
    if (allowed.indexOf(string.charAt(i)) == -1)
    return false;
    return true;
    }

  • Date range converted to String format?

    Simple question:
    When I was an avid Crystal Reports 8.5 developer, I remember there was something that converted a Date Range to a string, which contained the character "[" for inclusive and "(" for exclusive and looked something like this:
    "(2/24/08...3/15/09]"
    What was that function again please?

    HI,
    Please try this link if this what you meant ? [Click Here |http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=1662&PN=1]
    Try the DTStoDate function,
    DateTime Strings
    DTSToDate({DateTime String})
    The DTSToDate({DateTime String}) function extracts the date from a
    DateTime string field.
    Hopes this is the one!
    Regards,
    Clint

  • How to find as ascii value for a string or char in unicode system?

    Hello,
    How to find an ascii value for a string or char in unicode system?
    Thanks in Advance

    hi ,
    report demtest.
    data : c.
    field-symbols : <n> type x.
    data : rn type i.
    c = 'A'.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    This will convert 'A' to 65.
    Tom Demuyt
    How to convert ascii value to character.
    If I give input as 65 (ascill value) I want display 'A'.
    Below logic is for convert from character to ascii value , now I want to know how to convert ascii value to character.
    Naveen
    report demtest.
    *going from A to 65
    data : c value 'A'.
    field-symbols : <n> type x.
    data : rn type i.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    *going from 66 to B
    data : i type i value 66.
    data : x type x.
    field-symbols : <fc> type c.
    move i to x.
    assign x to <fc> casting type c.
    move <fc> to c.
    write c.
    regards,
    venkat.

  • Parameter Search, Alphanumerics but we want to search on range

    I've a bit of a dilemma here with how I'm going to implement this.
    I want to create a parameter that takes range values.  The field that this parameter will check against is a string field.  A range search does not work well for numeric string values.  The easiest way to do this is to convert that field in to a number...
    But the problem is this field also has alphanumeric values that the customers would also want to be able to search by.
    So the big question is... how the heck can I implement an effective search parameter with this?  I can't convert the field to a number field due to alphanumeric items and if I don't, Crystal will be very confused on a range search.
    Just to give you an idea of what these values of consist of:
    Any given number between 1 - 12000
    and
    values such as '9R1234, 8GT233, etc'
    Thanks.

    Hi there.
    I'm not exactly sure what you mean positional search but here's a more detailed explanation of my problem.
    I have a field, called UNIT_NUMBER and it is a String type field.
    I created a parameter that will prompt the user to input a range value that will check against UNIT_NUMBER.
    Let's say UNIT_NUMBER, for the most part, has values anywhere between 1 and 15000.  A small percentage of them also has the 9R1234, 8R4321 type of values.
    So if I run the report using this parameter, Crystal will usually have no problem with ranges that have the same amount of digits (ie, if I input my range of 5000 and 8000, Crystal will have no problem returning results).
    The moment the max range value is a digit higher than than the min range (like 8000 - 10000), Crystal will not take those values and give me an error at the prompt "The value is not valid."
    I'm guessing this is due to the fact that UNIT_NUMBER field is a string and not a number.
    And to answer your question about 9R1234-type values, no, they will be searching for the part of the string, mostly the first two strings (9R, 8R, etc)

  • Search does not find text string in a PDF file

    Some of the PDFs on my company's website have text that does not come up in a search of the PDF. You can see the text on the page, but it's ignored in a search. When I open the PDF and use the Select tool to copy the six-character string, then paste it into the Search field of the open PDF, the string pastes into the Search window as open boxes. While that might explain why the string is not found in the search, I'm confused about why the characters are correct on the PDF page, but not after they are copied and pasted.
    Here is an example: Search for this word in the attached PDF file:
    control
    The search will miss the first occurrence of Control in the first bullet on the page.

    Most of the fonts are embedded (except 1), but that does not mean you can search them as mentioned. The simplest way to avoid the problem is to go back to more standard fonts, like Arial, Courier, Times New Roman, and such. You may still have a problem with MAC users where they have Helvetical and Times Roman as standard. However, most of the common fonts have the same character associations and it is likely not a problem.

  • How do I get Unicode chars beyond the ASCII range to display ?

    Hello all.
    I have just recently started to learn Java.
    I want to display the data in a array using Unicode characters, but when I use the unicode code from the code sheet I merely get a ?.
    I looked about the net and understand that Java doesnt support none ASCII characters (by default?) , I think its possible to import various codes but not sure about that.
    Anyways...
    My question is: How do I get the Unicode character 2254 Box Drawing Element to display (also other non standard ASCII ) ? Print("\u2254") results in a ?.
    If you are wondering why:
    I want to store a map for a game into a data array with the entities represented as normal letters and characters, this map will be generated by the program randomly but I want to see the output of the map to test if its obeying the rules I set out for the map generation.
    I figured just read the array and print out the result , but to make it more legible in debugging convert the text characters to box drawing characters.

    Both methods you mentioned just generate a question mark instead of the box drawing element I want.
    I can get all the normal, ie letters and numbers and the common characters... but beyond that and all I get is a '?' in its place.
    Initially I just wanted it to print the character in the legend.
    The code below just prints a few lines of text , the legend to decipher the level display, and calls a class to create a level ..then the last call is to call a debug class to display the level that was created.
    *   Prelim Code for the Random Dungeon Generator       *
    *   used in Dungeon Runner                             *
    *   Created : 03/07/2009                               *
    public class DungeonGenerator {
          public static void main (String[] args) {
          System.out.println(
               "Prelimary code for the Random Dungeon Generator for Dungeon Runner Game\n\n"
                                   );                    // Just a text heading reminder for me
          System.out.println(
               "Test 1 - debug screen - 03 July 2009\n\n"
          System.out.println("Legend: \u2254 = Top Left Corner \t 2 = Top Right Corner");
          System.out.println("        3 = Bot Left Corner \t 4 = Bot Right Corner");
          System.out.println("        L = Left Wall \t\t R = Right Wall");
          System.out.println("        T = Top Wall \t\t B = Bottom Wall");
          System.out.println("        D = Doorway \t\t + = Play Space");
          System.out.println("        E = Exit Entity \t S = Start Entity");
          System.out.println("        . = None Play Space");
          System.out.println("\n----------------------------------------------------\n");
         // Call the LevelGen
         /** This is just a temperary call method
              I am will use another array and a
              loop to call the LevelGen the
              number of levels I decide the
              game will have
         LevelGen levelone = new LevelGen();          // Calls the LevelGen to create a Level
         levelone.displayLevel();                    // Display the level that was generated
                                                 // for debugging only
          }     // End Main method
    }      // End DungeonGenerator class

  • Multi Mailbox Search Date Range Results Inaccurate

    Hi All,
    I have an Exchange 2010 server with SP3 /RU3 installed. When I do a multi mailbox search using OWA /ECP and put in a start and end date from the Date Range dropdown box, my search results shows me more than just the intended date range of emails. For
    example; if I request just a particular month and year, my results will show a couple of years worth of emails not just the one month that I requested.
    If I do the same exact search using PowerShell command the results are accurate, they will show only the one month. We could use PowerShell commands but we'd would rather use the OWA /ECP console instead. To me it seems like a bug in the code. Has anyone
    else experience this issue or have a resolution?
    Thanks in advance.
    LJC321

    Possibly, this could be BUG.
    Haven't experience this kind of issue...
    Cheers,
    Gulab Prasad
    Technology Consultant
    My Blog:
    Exchange Ranger
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • How to load a text file (ASCII) into a TS string variable?

    I need to load a ASCII file into a TS string variable for subsequent processing. I tried the SecuenceBuilder DLL (in the examples directory) but it seems that this DLL has a bug. Some text files are not loaded properly. I have also tried the kernel32 functions (openfile, createfile, readfile ... ) handling them as a C program, but with no success. The property loader feature of TS is not the suitable solution for me, because I would have to modify all my text files to include some specific fields (step name, variables, starmarker ...). Doy you know an alternative procedure to load text files or any DLL that implements what I look for ? Any help would be grateful. Cesar ([email protected])

    Hi Cesar,
    I don't know if you have found a solution, but attached is a DLL built in VC that will read the text out of a file into a TestStand variable. The attached sequence file \SequenceFile1.seq contains a step type that is set to call the DLL responsible for reading the file. It reads the file specified under Step.FilePath and stores the data in Step.ReadData. Please let me know if this works for you. I have attached the source as well.
    Regards,
    Bob
    Attachments:
    ReadFile.zip ‏3628 KB

  • Search and Replace vi adds new text behind initial input when search critera is a empty string.

    Can anyone tell me what I am doing wrong?
    Want output to show N/A when nothing is entered in input string and to show the input string if something exists...
    The output of the attached VI is expected it to be Larron, but instead is outputting LarronN/A.
    Is there a way to make this VI do this without having to make a VI with an and/or component added to it?
    Attachments:
    SNR EX.vi ‏7 KB

    Right-Click the S&R function and select 'Regular Expression'
    Search for ^$, replace with 'N/A'

  • Search set of Characters in String in mapping

    Hello All,
    I want to search for a set of characters in a string and I want to do this in mapping.
    Can anyone help me in resolving this?
    Example:-
    String = "SAP PI is an Integration Tool"
    Search = "an Integ"
    OR
    just search for "an Integ" in the String.
    The String length can always change and the position of "an Integ" can also change.
    Please help!
    Thanks for your help and time,
    Abhi
    Edited by: Abhi_1516 on Nov 19, 2009 7:08 PM

    Thanks Sunil, for your quick response.
    I tried using that, but it's returning the index of the first occurrance of the Sub String and not "-1" as you have described.
    I am trying to write an UDF and I am getting syntax error ... where I am doing wrong?
    +int ind = (param2 + 7);+
    String str1 = param1.substring(param2,ind);
    String flag;
    if ( (str1.equals("an Integ")) )
    +     flag = "a";+
    else
    +     flag = "b";+
    return (flag);
    param1 and param2 are input parameter in the UDF.
    THanks for your help,
    Abhi
    Edited by: Abhi_1516 on Nov 19, 2009 7:35 PM

  • How to search for words in a string?

    I have a list of strings that I need to search for instances
    of a certain word (or part of that word) is there a way of doing
    this in flash please?

    Quickest and easiest way to do it is to search through an
    array of manually entered words.

  • How to Search for "(" error  in a string?

    I am trying to search for "(" in a string, however the compiler thinks that I searching for a regular expression, and fails.
    Exception in thread "main" java.util.regex.PatternSyntaxException: Unclosed group near index 1
    Please help me find a way to search for "(" in a string.
    Example:
    String test="This is a test.";
    if (test.matches("(")){
    System.out.println("There is a match")
    I also tried:
    test.matches("\050")
    and test.matches("\(")
    Thank you!

    I also tried:
    test.matches("\050")
    and test.matches("\(")For this particular problem, I think indexOf is a more appropriate solution. However, for future reference, I think what you want to do for parentheses is escape the backslash, not the bracket.
    i.e.
    test.matches("\\(");

Maybe you are looking for

  • Can't play sound from multiple programs

    So I have this new shiny box running Arch64 with a ASRock N68-S motherboard. I installed alsa and I am able to play music just fine using amarok or mpd. However, when I try playing two sounds at once, there is a short pause and the first program beco

  • List of PO's

    Hi, I need a list of PO’s for a vendor for Year 2007 Open and Closed along with it’s details. How should I get these details. Thanks, Veni.

  • Over payment by vendor

    hi friends, just had a problem.... One of our vendor has over paid invoices and would like us to return these funds to their New York Bank account. However, I'm not able to register Bank details on this item - the only available field is "House Bank"

  • HT201272 How do I redownload a purchased song to my iTunes on my computer

    I recently purchased Mya Fallen EP.  There are four (4) tracks on this EP.  The last track plays about 2:29  then it just stops.  The track is 4:05.  How do I redownload the track?  Or is their something wrong with file on your end?

  • Dependant routines in Update Rules ?

    Hello all Is it possible to create a routine in the Update Rules that uses a result of a previous routine in the same set of Update Rules ? For example:- I have a routine in the Update Rules for converting sales units from the communication structure