How to validate UTF-8 characters using Regex?

Hi All,
In one of my applications, i need to include UTF-8 character set for validation of a certain string, which I am validating using a Regex.
However, I do not know how to include UTF-8 characters in a Regex, or if at all, we can specify the UTF-8 charaters ina regex.
Please Help!! Its Urgent!!!
Thanks in Advance,
Rajat Aggarwal

Ok, Let me re-state my problem again, and exactly what i am looking for:
I have an XML file with the following header: <?xml version="1.0" encoding="UTF-8"?>
This XML file contains a tag, whose text is to be validate for a syntax : Operand operator Operand.
Now, the operand on the right hand side of the operator could be a variable, or a string literal, which may contain some permissible special characters (as said above), and may or may not contain UTF-8 characters as well.
I am using the xerces SAXParser to parse the XML document, and am retrieving the text of the elemnt tag with the method <code>element.getChildText("<tagName>")<//code>
According to the org.jdom.Element API Docs,
the getChildText() method is defined as follows:
h3. getChildText{noformat}public java.lang.String getChildText(java.lang.String name){noformat}<dl><dd>Returns the textual content of the named child element, or null if there's no such child. This method is a convenience because calling <code>getChild().getText()</code> can throw a NullPointerException. <br<dd><dl><dt>Parameters: </dt><dd><code>name</code> - the name of the child </dd><dt>Returns: </dt><dd>text content for the named child, or null if no such child
</dd></dl></dd></dl>
Now, I am not sure if the String that I am reading is in UTF-8 Format. Is there any special way of reading a string in that format, or for that matter, convert a string to UTF-8 encoding?
h3.

Similar Messages

  • How to store UTF-8 characters in an iso-8859-1 encoded oracle database?

    How can we store UTF-8 characters in an iso-8859-1 encoded oracle database? We can NOT change the database encoding but need to store e.g. Polish or Russian characters besides other European languages.
    Is there any stable sollution with good performance?
    We use Oracle 8.1.6 with iso-8859-1 encoding, Bea WebLogic 7.0, JDK 1.3.1 and the following thin driver: "Oracle JDBC Driver version - 9.0.2.0.0".

    There are a couple of unsupported options, but I wouldn't consider using them on a production database running other critical applications. I would also strongly discourage their use unless you understand in detail how Oracle National Language Support (NLS) works, otherwise you could end up with corrupt data or worse.
    In a sense, you've been asked to do the impossible. The existing databas echaracter sets do not support encoding the data you've been asked to store.
    Can you create a new database with an appropriate database character set and deploy your application there? That's probably the easiest solution.
    If that isn't an option, and you really need to store data in this database, you could use one of the binary data types (RAW and BLOB), but that would mean that it would be exceptionally difficult for applications other than yours to extract the data. You would have to ensure that the data was always encoded in the same character set, otherwise you wouldn't be able to properly decode it later. This would also add a lot of complexity to your application, since you couldn't send or recieve string data from the database.
    Unfortunately, I suspect you will have to choose from a list of bad options.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How To Color a Text string using Regex (java.util.regex)

    Hello,
    How can I color a text string using regex class in 1.4?

    Yes, did you notice it said something about incredibly vague functionality?
    Let me break it down for you
    > How can I color a text string
    Strings do not have color... You can color a component (a label, a button), but you can't color a string
    > using regex class in 1.4?
    Using a regular expression? How would a regular exression color anything? Do you have embedded color codes? Are you searhing a string for some secret word?
    What are you talking about?

  • How to replace XML special characters using Xpress e.g. ' = '

    Hellos
    I need to write some XML built from resource data.
    The resource data strings can contain anything e.g. & ' " < and > characters.
    How do I replace these characters with the strings & &apos; " etc.... from within Xpress?
    I try something like:-
    <set name='testchar'>
    <switch>
    <ref>thisLetter</ref>
    <case>
    <s>'</s>
    <s>&apos;</s>
    </case>
    <case>
    <s>"</s>
    <s>"</s>
    </case>
    <case default='true'>
    <ref>thisLetter</ref>
    </case>
    </switch>
    </set>
    But when saved the <s>&apos;</s> gets saved as <s>'</s>
    Is this impossible with Xpress forcing me to invoke my own Java class? (which is a pain to do because of internal politics re restarting of App Server).

    Hmmmm seems there is transformation in this set up too.
    What I am trying to do is to parse a string which may or may not contain XML special characters into an XML acceptable string.
    e.g. transform the surname O'Connor into O&apos ;Connor (with no embedded blank)
    I wish to write a rule which uses XPress language to achieve this.
    I want to convert the character ' into the string &apos ; (with no blank between apos and ;) and similar for the other XML specials.
    Is this possible?

  • X11 won't display UTF-8 characters (using Kbabel)

    Hello everyone
    Boy, the discussion lists have changed! Forums are a good idea, though.
    I'm a volunteer open-source translator, and the most effective translation editor for us is Kbabel. (LocFactoryEditor [1] for OSX is very good, though. I use it continually, and BBEdit [2] for CVS/SVN management of translation files.)
    When I installed Kbabel, everything went OK, but when I tried to open a PO (Portable Object, translation file format, basically a text file) file, the translations in my language (Vietnamese) were just gibberish. None of the accented characters displayed correctly. Since my language is pretty much all accented characters, this was a critical problem. Characters entered had the same problem. No readable data in, no readable data out, no translation possible.
    I had set my X11 prefs to inherit my keyboard choice, and had chosen the right keyboard. I have Lucida Grande set as my default font, and it handles Vietnamese very well.
    This was months ago. I reported it as a bug against Kbabel, but with investigation, we found it was an X11 problem. I was told at the time (sorry, I can't remember the reference) that this was a known X11 bug, which Apple had not yet fixed. Judging by the continuing mess when I try to use Kbabel now, it hasn't been fixed.
    How do we track bugs reported to Apple, or continuing problems of this type? Do you think this is really the problem, or is there another way to solve it?
    Any help very much appreciated.
    from Clytie
    [1] http://www.triplespin.com/en/products/locfactoryeditor.html
    [2] http://www.barebones.com/index.shtml

    I would suggest you repeat your query in the unix forum, where the experts on such stuff are more likely found, and where there have been other threads about using accented chars in terminal, etc.
    http://discussions.apple.com/forum.jspa?forumID=735

  • How to get UTF-8 Characters from HTML to Java?

    Hi everyone, I'm trying to set up an application that will allow display and entry of international data from HTML forms via servlets. The problem is that I can't get the data back into a java string to apply to the DBMS.
    I have tried using UTF-8 and specific character sets such as ISO-8859-5 (Russian). I have specified these character sets/encodings as follows:
    HTML: meta content-type header charset=xxx and <form accept-charset=xxx
    Servlet Response: setLocale(appropriate locale) and setContentType("text/html; charset=xxx") prior to calling response.getWriter()
    Servlet Request: setCharacterEncoding("xxx") (e.g. servlet 2.3)
    When I use request.getParameter(xxx) I get normal characters (a, b, c) and nothing for international characters or sometimes question marks.
    I have also tried various combinations of:
    new String(request.getParameter("xxx").getBytes("xxx"),"xxx")
    Could someone please point me in the right direction?
    TIA

    Thanks for all of your suggestions. It still refuses to work.
    I entered the following: ���^�E on the HTML form using the Chinese(PRC)keyboard on my Win2K box.
    I checked and verified the correct encoding in the servlet request (GB2312 for chinese characters)
    request.getParameter(xxx) yields ???
    new String(request.getParameter(xxx).getBytes("GB2312")) yields three boxes (values 20309, 27946 and 23380)
    new String(request.getParameter(xxx).getBytes("GB2312"), "UTF-8") yields nothing
    Any ideas?

  • How to validate a email address using Validation Pattern?

    Hi,
    is there any document for Validation Pattern? i m looking for a way to validate email addresses in my form.
    it's going to be something like * @ .
    i have no idea of how to do this, or maybe validation pattern is no good? use java script instead?
    any advice is appreciated!
    thanks.

    Hi erv2,
    You just need to place this script in the "exit" event of the field that u r using for email address.
    var r = new RegExp(); // Create a new Regular Expression Object.
        r.compile("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,3}$","i");
    if( this.rawValue == null || this.rawValue == "")
    else
    var result = r.test(this.rawValue);                                              
    if (result == true) // If it fits the general form,
         true;               
    else
          xfa.host.messageBox("Please enter a valid email address ");
          this.rawValue = "";
          false;               // fail the validation.
    Thanks
    Amita
    Edited by: amita arora on Jan 20, 2009 10:44 AM

  • How to validate if the baseBN using JNDI..?

    Hi,
    I have the directory server's admin username, admin password, system ip and port along with the BaseDN, how do i check whether the BaseDN that was entered by the user is valid one using JNDI..?
    thanks,
    Barani

    >
    gopalkrishna baliga wrote:
    > The field is defined as CHAR type and I can't change this type.
    Heard about string operator C ontains O nly (CO) ? SAP Help link: [http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm]

  • How do I enter Chinese characters using an American keyboard?

    Does anyone how to create a document of Chinese documents using a pinyin entry system in either Appleworks or MS Word? I once had the feature set up in Word, but I am unable to recreate it. I recently installed the Microsoft Language Register, but I am not sure if that is the correct utility to use nor how to use it. Thank you!

    Does anyone how to create a document of Chinese
    documents using a pinyin entry system in either
    Appleworks or MS Word?
    System Prefs > International> Input Menu, check the box for the kind of Chinese you want. For full info, just see these pages:
    http://www.yale.edu/chinesemac
    http://www.yale.edu/chinesemac/pages/os_x2.html

  • Captivate 6 How to validate user input without using keyboard shortcuts

    I've been using Adobe Captivate 6 for about 4 months now.  Completely new to the program.  The number one function of Captivate for me will to create many software simulations for verifiable training.  This means that I will be utilizing the training and assessment modes A LOT.  I have run into many hurdles throughout the process, but one of my biggies right now is this:
    In the training and assessment modes, I have times where the user must input data such as an address or number.  In the actual software they will be utilizing it is not always required to use TAB or ENTER in order to move to the next field.  In some instances, it will be necessary to actually click into a field after entering data.  My problem is that it seems as if Captivate will not allow this,  as a keyboard shortcut is automatically entered even if a TAB or ENTER is not required after input.  I assume this is so that the inputted information can be verified.  If you decide you do not want to use a keyboard shortcut to validate the inputted information, you must have a submit button.  Is there any way to change this??  All I want is for the user to enter information and then click into another field WITHOUT having to press ENTER, TAB, or hit a submit button.  Is this even possible if you need user input to be validated??  Any ideas or suggestions would be much appreciated!!

    Hello,
    A while ago I explained the work flow I’m using often in that case, only for the last field you need to have either a shortcut or a submit button AND the sequence has to be imposed. The idea is that you make the Submit button for the first field transparent, delete the  ‘Submit’ text and put it over the second field. So if the user clicks on the second field, he also submits the value of the first field.
    Here is the blog post I’m referring to:
    http://lilybiri.posterous.com/one-submit-button-for-multiple-text-entry-box
    Although it was written for previous versions, the idea will still be functional.
    Lilybiri

  • How to validate a node list using business rules

    Hello everybody:
    I'm developing with Oracle SOA Suite 11.1.1.6
    I'm using business rules to check some business requirements from my processes and I am having a situation that I like to share with you in
    order to receive some advices to solve it.
    In the rule input variable I have an element with the following structure (example):
    [code]
    <User>
        <Name>Big Boss</Name>
        <ExpertiseLevel>10</
    ExpertiseLevel>
         <DepCode>RRHH</DepCode>
        <AssignedUsers>
            <User>
                <Name>Roman</Name>
                <ExpertiseLevel>5</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Mark</Name>
                <ExpertiseLevel>2</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Jane</Name>
                <ExpertiseLevel>5</ExpertiseLevel>
                <DepCode>RRHH</DepCode>
                 </AssignedUsers>
            </User>
            <User>
                <Name>Lisa</Name>
                <ExpertiseLevel>3</ExpertiseLevel>
                <DepCode>FNZ</DepCode>
                 </AssignedUsers>
            </User> 
        </AssignedUsers>
    </Request>
    [/code]
    Using business rule I need to check that all the users departament code *<DepCode>* match with an specified code, besides another
    validations. As it's showed in the previous XML I have a user list inside the *<User>* node and I have to use a loop to check all the users
    assigned to the Big Boss user. My question is: Which could be the most "efficient" way to make that loop?
    I have been thinking in some options:
    1- Create a ruleset for users validation and make the loop inside the process executing the user ruleset many times as users exist?
    2- Using functions (but this is not an option because I have a requirement that forbid to use functions inside the business rules
    implementation)
    Could anybody tell me how can I use the foreach available in the ruleset advanced mode? Can I execute a desicion table in a loop?
    Thanks in advance

    hi
    I guess you will need a CX.
    when user enters a value to the node,your CX will get fired.
    it will take the current value and check with your database.if value already exists then you have to empty that node in the CX. and show a message that you needs to change the value of node.
    Let me know if you need code.
    send a mail on [email protected]
    I will provide you the code.
    Regards,
    Kaushal

  • How to Validate this using Regular Expressions

    Hi All,
    I have following types of Mail IDs, Each is a String.
    It may be either of the Following:
    [email protected]
    or
    Ameer<[email protected]>
    Then How to validate using the Regular Expressions.

    use this regex.. might need to convert it from perl regex flavor:
    (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
    \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
    ?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
    31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
    ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
    (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:
    (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)
    ?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\
    r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[
    \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)
    ?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t]
    )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*
    )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)
    *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+
    |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r
    \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:
    \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t
    ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031
    ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](
    ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?
    :(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?
    :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?
    :(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?
    [ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\]
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|
    \\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>
    @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"
    (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?
    :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[
    \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-
    \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(
    ?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;
    :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([
    ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\"
    .\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\
    ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\
    [\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\
    r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\]
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]
    |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0
    00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\
    .|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,
    ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?
    :[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[
    ^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]
    ]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*(
    ?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(
    ?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[
    \["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t
    ])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t
    ])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?
    :\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|
    \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:
    [^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\
    ]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)
    ?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["
    ()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)
    ?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>
    @,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,
    ;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:
    \r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[
    "()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])
    *))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])
    +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\
    .(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(
    ?:\r\n)?[ \t])*))*)?;\s*)

  • Remove all the special characters using java.util.regex

    Hi,
    How to remove the all the special characters in a String[] using regex, i have the following:-
    public class RegExpTest {
         private static String removeSplCharactersForNumber(String[] number) {
              String number= null;
              Matcher m = null;
                   Pattern p = Pattern.compile("\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\_\\+\\-\\{\\}\\|\\;\\\\\\'////\\,\\.\\?\\<\\>\\[\\]");
                   for (int i = 0; i < number.length; i++) {
                   m = p.matcher(number);
                   if (m.find()) {
                        number= m.replaceAll("");
                   System.out.println("Final Number is:::"+number);
                   return number;
              public static void main(String args[]){
                   String[] str = {"raghav!@#$%^&*()_+"};
                   RegExpTest regExpTest = new RegExpTest();
                   regExpTest.removeSplCharactersForNumber(str);
    This code is not working and m.find() is "false", here i want the output to be raghav for the entered string array, not only that it should remove all the special characters for a entered string[]. Is there a simple way to do this to remove all the special characters for a given string[]? More importantly the "spaces" (treated as a spl. character), should be removed as well. Please do provide a solution to this.
    Thanks

    You don't need the find(). Just use the replaceAll() on each element of the String[] i.e.
    String[] values = ...
    for (int i = 0; i < values.length; i++)
        values[i] = p.matcher(values).replaceAll("");
    }I can't understand your regex since the forum software has mangled it but you just need to add a space to the set of chars to remove. When you post code, surround it with CODE tags then the forum software won't mangle it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can I display special characters of NonEuropean languages (French, Italian, Spanish, German and Portuguese.) using import string mechanism

    I would like to translate the User Interface of my application to French, Italian, Spanish, German and Portuguese.
    When I put special characters in the import string file they showed up as ? (question mark)
    The import strings file includes the following parameters for each string: font, text, size and style. (but no field for script)
    In order to use a unicode font such as Arial I need to select a french script. But this option is not supported bu LabView (As far as I saw)
    A) Is there a font which is directly German/ French etc and not regula font + script parameter?
    B) Are there another required step
    s for special characters support? (When I put speciual characters in the import string file the showed up as ? question mark)

    This was discussed last week in this group- read the previous messages.
    Look for the thread "Foreign Languages in Labview"
    And recite the mantra
    ActiveX is good
    ActiveX is holy
    All Hail Bill
    Those who claim otherwise are heretics and not to be trusted
    Actually, in this case the non-ActiveX suggestions may be good.
    talia wrote in message
    news:[email protected]..
    > How can I display special characters of NonEuropean languages (French,
    > Italian, Spanish, German and Portuguese.) using import string
    > mechanism

  • How to validate material status in physical Inv Doc creation using MI01

    Hi Experts,
    I would like to know how to validate material status while creating physical inventory document using MI01 transaction.
    I tried to figure out a suitable BADI and customer exits ,but it didnt work out well.
    Kindly share your thoughts on how this can be achieved.
    Regards,
    Mohammed Aslam Rasheed

    Do you really create your inventory documents with this MI01 transaction manually by entering material for material?
    The real transaction for physical inventory is MI31. How do you want SAP to react if hundreds of materials are selected and inventory documents are created in a batch process?
    SAP takes care about the material status in MI04 and MI07 transactions.
    I am not aware of any exit for MI01 maintenance, you may consider Explicit and Implicit Enhancement Options

Maybe you are looking for

  • Just one USB port on MacBook Pro 15"

    Hi, I just got a MacBook Pro 15" 2.33GHz. I may be silly but I find it has only one USB port! This is killing me because I need at least two USB port to connect my mouse and iPhone. Do I missed something? Thanks, ff

  • Error in user account-SU01

    Hi, I am working with SRM5.0. I have observed a problem in accessing an user account. When I try to open the userid in SU01, I get a message: Internal error - insert in sorted tabl ZADRU 10000000105890000011257INT001AD_DEFAULT This user is a part of

  • Upgrade Solution Manager 7.1 add-on ST-ICO

    Hi everybody I'm upgrading from Solman 7.01 to 7.1. In the prepartion I'm stucked at the phase ADD-ON selection. The following stack is the target: SAP_BASIS 702 0009 SAPKB70209 SAP Basis Component SAP_ABA 702 0009 SAPKA70209 Cross-Application Compon

  • Question: Can a person Fill-in and Sign documents on a Blackberry device?

    Question: Can a person Fill-in and Sign documents on a BlackBerry device?

  • After running spcreate.sql -You have encountered an unexpected error.

    HI, Am on 11.5.10.2 RDBMS 9i I creates snapshot like this cd $ORACLE_HOME/rdbms/admin sqlplus "/ as sysdba"      -- Enter tablespace name , perfstat password when prompted To Take performance snapshots of the database: sqlplus perfstat/perfstat exec