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

Similar Messages

  • Replacing a set of characters from a string in oracle sql query

    I want to replace a set of characters ( ~    !     @    #     $     %     ^     *     /     \     +    :    ;    |     <     >     ?    _  ,) from a STRING in sql
    select 'TESTING ! ABC 123 #'
    FROM DUAL;
    What is the best way to do it? Please provide examples also.

    What is your expected output... The query I posted just removes them, it never replaces them with spaces..your string already has space.. if you want to remove space as well .. try this...
    SELECT TRANSLATE ('TESTING ! ABC 123 #', '-~!@#$%^*/\+:;|<>?_, ', ' ') FROM DUAL;
    Output:
    --TESTINGABC123
    Else post your expected output..
    Cheers,
    Manik.

  • Search and replace characters in a string

    I am very new to Sharepoint and need your help.  I have set up a calculated column in a sharepoint list that combines a IT release number to its Release title.  The list is set to appear on a calendar plus web part.  The idea is to show
    the title and release number of all deployments going to the field on a particular day.  The issue is that the release number has a bunch of zero's in it that I do not need to be displayed.  For example a release number could be "RND000000123456". 
    I need to parse out "D000000" so only "RN123456" along with its title show up on the calendar.  Please help!!

    Go here and search for "Remove characters":
    http://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx
    From that page:
    Remove characters from text
    To remove characters from text, use the LEN, LEFT, and RIGHT functions.
    Column1
    Formula
    Description (possible result)
    Vitamin A
    =LEFT([Column1],LEN([Column1])-2)
    Returns 7 (9-2) characters, starting from left (Vitamin)
    Vitamin B1
    =RIGHT([Column1], LEN([Column1])-8)
    Returns 2 (10-8) characters, starting from right (B1)
    You could also try the REPLACE function:
    http://office.microsoft.com/en-us/windows-sharepoint-services-help/replace-function-HA001161055.aspx
    Brandon Atkinson
    Blog: http://sharepointbrandon.com

  • 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;
    }

  • Is there a way to set up a 'dial string' with a 'wait' function?

    I'm trying to set up calling my work voicemail. On the blackberry i could set up a dial string with a wait function. So when i dialed the voicemail #, once it answered I could hit a button on the phone and it would send the next set of characters (in this case, my extension #), then wait again, and once I got my password prompt, i could again send the next characters (now my password). I can find the way to put in a pause...but it isn't enough and doesn't do what i want it to do. How can i do this on my iPhone?
    It really is important in that i don't want to have to enter these characters while i'm driving.

    Thanks for the reply....i've tried that and it's not doing what i want it to. Our VM sometimes has delays, so its impossible to predict home many pauses i need....really need a wait function.
    Thanks

  • Creating a set of characters

    This seems simple, but it is really bothering me because it is not working. How do I make a simple set of characters. For example: I would like to make a set called "operators" and i would like it to include '-', '+', '*', '%', etc. I will also have a set of "digits" which would be '0' - '9'.
    That way, when analyzing a string, I will be able to pick apart each character and figure out which set it belongs to.
    Any help would be greatly appreciated.

    Something like this might do it (if I'm reading your question correctly)
    class CharacterSet
      public static void main(String args[])
        String operators = "%+-*/";
        String numbers = "0123456789";
        String letters = "abcdefghijklmnopqrstuvwxyz";
        String capitals = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        String test = "A+ 4 u";  
        for(int i = 0; i < test.length(); i++)
          if(operators.indexOf(test.charAt(i)) > -1) System.out.println("operator");
          else if(numbers.indexOf(test.charAt(i)) > -1) System.out.println("number");
          else if(letters.indexOf(test.charAt(i)) > -1) System.out.println("letter");
          else if(capitals.indexOf(test.charAt(i)) > -1) System.out.println("capital");
        System.exit(0);
    }

  • Google search displays strange characters before search, firefox 3.6.7, ubuntu 10.04

    I get these strange characters when I go to Google search using Firefox 3.6.7 and Ubuntu 10.04.......see below
    ᎢᏳᏍᏗ ᎨᏒ ᎣᏲᎲᎢᎠᏑᏰᏍᏗ ᏳᏍᏗ ᎠᏁᎵᏔᏅ (These characters are on the Google search page before I search and below search bar.
    strange characters below:
    ᎾᏍᎩᏯᎢ Directory ᏚᎾᏓᏡᎬ
    What is going on....It reads OK using Chromium. I can't read anything. I am using Firefox 3.6.7. My View....character encoding is set to :
    Western(ISO-8859-1) and auto detect "on"
    == ?

    Just to update this topic if anyone else has the issue. I've fixed it by manually amending the following setting in about:config -
    Preference name: intl.accept_languages
    Value: en-gb, en
    If you're in the US you'd use ''en-us, en'' instead.
    I then re-ran Firefox Sync and now on the Windows machines this value shows up as User Defined instead of default and this is now kept when syncing (I'm assuming the default values are not included when syncing preferences, for obvious reasons).

  • Some characters could not be mapped using ISO-88559-1

    I'm creating a Flash/Flex app which will load multilingual xml for all the text displayed. I tried using this example:
    http://www.adobe.com/devnet/flash/articles/filtering_data_e4x_02.html
    but got an error
    "...some characters could not be mapped using ISO-88559-1..."
    when I pasted the example xml into Flex and tried to save it. I've searched for another tutorial on creating multilingual content and using it in xml. The plan is to contract the translations to be delivered in xml. Any suggestions?

    Yvonne-
    You can have many libraries with many albums and files within them. Each library is independent, so if you upload a file to two libraries then you two copies. If you put a photo from a library in albums that live within that library, then there is only one copy in the library that each album has access to so it will show up when you view the album. This might help : http://forums.adobe.com/message/5197228#5197228.
    I found a few incomplete files in your account also. We will take care of this for you and contact you when it is complete.
    Pattie
    Some of these links might also be useful to you:
    Revel FAQ’s:
    http://forums.adobe.com/community/revel/faq
    especially:
    FAQ: Where can I learn tips and tricks about Revel? http://forums.adobe.com/message/5798092#5798092
    FAQ: How do I share my photos in Revel? http://forums.adobe.com/thread/1295026
    FAQ: How do I add (upload) files to revel? http://forums.adobe.com/thread/1162795?tstart=0

  • Returning more attributes in search set when inviting to new event

    Hi all,
    We are currently running SunOne Calendar 5.1 and some of our users are complaining that when inviting people to an event who have a common name (i.e. John Smith), quite often, more than one result is displayed in the search set. With two "John Smiths" who have no middle name, how do you determine who the correct person is you wish to invite?
    Is there any way of displaying other attributes in the search set (i.e. e-mail address), so users can select the correct person?
    Regards,
    Paul Hughes
    University of Wales, Bangor

    I have found a solution to this issue. It seems that when using a programmatic view object which has a transient attribute as its primary key you need to override more methods in the ViewObjectImpl so that it knows how to locate the row related to the primary key when the view object records aren't in the cache. This is why it would work correctly sometimes but not all the time. Below are the additional methods you need to override. The logic you use in retrieveByKey would be on a view object by view object basis and would be different if you had a primary key which consisted of more than one attribute.
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i) {
        return retrieveByKey(viewRowSetImpl, null, key, i, false);
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, String string, Key key, int i, boolean b) {
        RowSetIterator usersRowSetIterator = this.createRowSet(null);
        Row[] userRows = usersRowSetIterator.getFilteredRows("UserId", key.getAttribute(this.getAttributeIndexOf("UserId")));
        usersRowSetIterator.closeRowSetIterator();
        return userRows;
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i, boolean b) {
        return retrieveByKey(viewRowSetImpl, null, key, i, b);

  • Supplementary characters and string functions

    I am using AL32UTF8 as my database character set and plan to store Japanese supplementary characters in the DB character set itself. Do I need to use any special string functions for these supplementary Japanese characters.

    With the AL32UTF8 character set, supplementary characters like any other characters, except that they are the widest (4 bytes). You just need standard multibyte processing.
    With AL16UTF16 (NCHAR), and depending on your needs, you may want to use certain SQL function variants that have 4 in their name: LENGTH4, INSTR4, SUBSTR4, LIKE4.
    When retrieving AL32UTF8 supplementary characters through JDBC or OCI in UTF-16 mode, you have to take care of the fact that one AL32UTF8 supplementary character becomes 2 UTF-16 code units (a surrogate pair). This is important for buffer allocations, length calculations, and any code that can split strings into substrings.
    -- Sergiusz

  • Set cursor in Control String component

    Hello:
    I would like to set cursor in "Control String" automatically when I open my VI. If I open my VI, cursor should be seen automatically in the text field of "Control String". The user hasn`t set cursor by mouse into this field. Has anybody an idea how can I do?
    Thanks!

    Create a property node for the control on your block diagram and set the Key Focus property value to TRUE.
    http://zone.ni.com/reference/en-XX/help/371361H-01​/lvprop/ctrl_key_focus/
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • 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

  • Convert set of characters to a word

    experts,
           how to convert a set of characters to a word while displaying .
    ex:
        data  : a type char20.
    a = ' FORM A WORD'.
    write :/ a.
    when i execute the above code , list gets generated.
    when i press the cursor on any charater of a the whole value
    should be get selected and not a single character.
    can it be done.
    thanks in advance.

    use color addition it highlights the word. or else use hotspot on addition it will get the complete word when you select.
        data  : a type char20.
    a = ' FORM A WORD' color 2.
    write :/ a.

  • Characters in String : Unicode 16-bit to custom 32-bit

    I understand that internally in Java, characters in Strings are actually Unicode characters, with each character represented with 16 bits.
    So, character �L� in Unicode is 0x004C
    which is also 0000 0000 0100 1100
    Now, I wish to encode each of the 4 bits above into individual ASCII characters:
    = 0 0 4 C
    = 0x30 0x30 0x34 0x43
    = 00110000 00110000 00110100 01000011
    So, from the original 16-bit character in Java, I want a final 32-bit.
    Eventually, I�ll need to send the final result over the network, via OutputStream/writer and socket.
    Can someone help me on this ? Or give me some ideas... Thanks.

    trick: prepend the number with 1 and use substring... like int charWith1 = c + 0x10000. That'll make charWith1 to be of the format 0x1XXXX. Then call hexstring on that, you get a string like "1XXXX." Then you can drop the 1 with a call to substring.
    of course there are methods that use only bit operations and additions to do it, making it a bit faster.. like this:
    byte byte0 = (byte) ((c & 0x000F) + '0');
    byte byte1 = (byte) (((c & 0x00F0) >> 4) + '0');
    ...

  • Removing non-numeric characters from string

    Hi there,
    I need to have the ability to remove non-numeric characters from a string and I do not know how to do this.
    Does any one know a way?
    Example:
    Present String: (02)-2345-4607
    Required String: 0223454607
    Thanks in advance

    Dear NickM
    Try this this will work...........
    create or replace function char2num(mstring in varchar2) return integer
    is
    -- Function to remove Special characters and alphebets from phone no. string field
    -- Author - Valid Bharde.(India-Mumbai)
    -- Date :- 20 Sept 2006.
    -- This Function will return numeric representation.
    -- The Folowing program is gifted to NickM with respect to his post on oracle site regarding Removing non-numeric characters from string on the said date
    mstatus number :=0;
    mnum number:=0;
    mrefstring varchar2(50);
    begin
    mnum := length(mstring);
    for x in 1..mnum loop
    if (ASCII(substr(upper(mstring),x,1)) >= 48 and ASCII(substr(upper(mstring),x,1)) <= 57) then
    mrefstring := mrefstring || substr(mstring,x,1);
    end if;
    end loop;
    return mrefstring;
    end;
    copy the above program and use it at function for example
    SQL> select char2num('(022)-453452781') from dual;
    CHAR2NUM('(022)-453452781')
    22453452781
    Chao!!!

Maybe you are looking for