Special Characters Check in OBPM

Is this code good to check for special characters in OBPM 10GR3?
Pattern p = Pattern.compile("/[a-zA-Z0-9]/g");
     Matcher m = p.matcher("This is a string");
     boolean matched = m.matches();
     logMessage("--Identifying Special Characters--"+matched);
     if (matched == true)
          logMessage("--Contains Special Character--");
     }

Here's what I use to fix file names to ensure that they do not have special characters or international characters:
String beforeConversion = "àÀâÂäÄáÁéÉèÈêÊëËìÌîÎïÏòÒôÔöÖùÙûÛüÜçÇ’ñ";
String afterConversion = "aAaAaAaAeEeEeEeEiIiIiIoOoOoOuUuUuUcC'n";
// does it contain international characters?
if (originalFileNameArg.match(regexp : '/[àÀâÂäÄáÁéÉèÈêÊëËìÌîÎïÏòÒôÔöÖùÙûÛüÜçÇ’ñ]+/').length() > 0) {
    int i = 0;
    String @char;
    while (i < beforeConversion.length()) {
        originalFileNameArg = originalFileNameArg.replace(from : beforeConversion.charAt(position : i),
                                                          @to : afterConversion.charAt(position : i));
        i = i + 1;
String[] m = originalFileNameArg.split(regexp : '/[^a-zA-Z0-9_,']+/');
int i = 0;
boolean first = true;
foreach (item in m) {
    if (! item.empty) {
        if (first) {
            retValue = item;
        else {
            retValue = retValue + " " + item;
    first = false;
    i = i + 1;
return retValue.trim();Dan

Similar Messages

  • Special Characters - Check Box without Check

    I just completed a marketing letter that will be turned into a marketing template for disterbution to would-be clients via eMail. In this marketing letter their is a short survey with yes and no answers. Before each answer their is a box ( ☐ Yes ☐ No ).
    How do I formate the box to allow the client to replay to this email by simply adding a check the correct box and sending it back to me?
    Rick
    Houston & San Francisco

    Not possible in Pages which would be a poor choice anyway as it doesn't appear as a document in the email, nor would most recipients have the software to open it.
    You can make a .pdf form to do this but require Adobe Acrobat Pro to format the form.
    The other alternative is to make up an HTML email with some JavaScript to make it work.
    Peter
    ps I hope you will have run a spellchecker over your final work.

  • Problems with special characters in the data.

    Hi All,
    Whenever, I'm trying to data such as "Lämmerzunge" which are having some special characters in it, it is storing them as L�mmerzunge. Is there anyway to handle these?
    Thanks in advance.
    Regards,
    Venky

    Check if database characterset supports these special characters
    check client's nls settings.
    check client machine's language settings (converts characters in driver level)

  • Need to remove special characters

    Hello All
        Some input is comming from source field, if any special characters comming from source field, I need remove special characters and send data source to target field. please suggest me how will i do .
    Thanks&Regards,
    Venkat

    Hi Venkat,
    check this thread.
    Handling Special Characters
    check the document :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Depends upon encoding methods handling will differ,
    you can use ISO-8859-1 or ISO-8859-2 instead of UTF-8 for some special characters.
    check this blog:
    /people/ulrich.brink/blog/2005/08/18/unicode-file-handling-in-abap
    cheers
    Sunil

  • Special characters conditions in receiver determination

    hi there,
    i have the following problem:
    There are conditions in receiver determination to find the proper xsl mapping for different segments in IDocs.
    That works fine.
    But if there are special characters like &, the interface mappings can't be found, because for the conditions the xml is already corrupt.
    So, i've tried to replace all occurrences of & with &amp; in a java mapping that is called before the xsl mappings.
    It doesn't work, because in that case conditions are processed before the java and xsl mappings.
    Do you have any idea how to replace special characters before conditions in receiver determination are processed?
    thx in advance
    Stefan

    Handling the Special Characters in XI
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
    Find out which character encoding the receiver system expects and put the same to the receiver channel.
    By default the file adapter would create a file with UTF-8, which might not be useable for the receiver.
    check this thread.
    Handling Special Characters
    check the document :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Depends upon encoding methods handling will differ,
    you can use ISO-8859-1 or ISO-8859-2 instead of UTF-8 for some special characters.
    check this blog:
    Unicode File Handling in ABAP
    *Suppress Special Character *
    Suppress Special Character

  • How to check special characters in view

    hi,
    I have a field in view,in which want to check the field value doesnt contain any special characters.
    the field is a char field and it is not associated to any specific data element.
    Can u please help me in this reg.
    Regards,
    Saujanya

    Hi Saujanya,
                        In my recent reply............i have give the general answer.
    Here is the answer you are  looking for........
    data:
       w_check(37)  TYPE c.
    w_check = sy-abcde.
    concatenate '0123456789' w_check INTO  w_check.
    concatenate '_'   w_check INTO  w_check.
    IF view_name-field_name CO w_check.
    ur code.......
    ELSE.
    Message 'UR text' TYPE 'E'.
    ENDIF.
    Hope,your problem is solved.........
    Reward,if helpful.
    Regards,
    V.Raghavender.

  • Check on special characters

    In my program, on the selection screen a user can enter any variable except  special characters.How can I put a check on special characters??

    hi,
    In our key board, these many special characters present..
    so try your code like this..
    data: spe_char(31) value '~`!@#$%^&*()_+-=\|][{}";:,./?><'. ( include all
    special chars whatever u want)
    spe_char1 value ' '. ( this is to check empty space)
    spechar2. (this is to check single ' ).
    Create one text element and assign ' as value to that text element.
    in ur program code as given below.
    spechar2 = text-001.
    if (fieldname) CA spe_char.
    MESSAGE "special character is present in the given input
    endif.
    if ( fieldname) CA spe_char1.
    message "special character is present in the given input
    endif.
    if (fieldname) CA spe_char2.
    len = strlen( fieldname ).
    if sy-fdpos NE len.
    message "special character is present in the given input
    endif.
    endif.
    Hope this code will guide you ..
    regards
    vijay

  • Check whether there is any Special Characters in a String ?

    Hi All,
    I am having a very large String. I like to know how to check whether there is any special characters present in a string
    Thanks,
    J.Kathir

    I am having a very large String. I like to
    I like to know how to check whether there is any
    special characters present in a stringAll characters are special in a way. You shouldn't just single a few out because they don't look "normal" to you. Maybe they have golden hearts?

  • Function Module tto check special characters in a field

    Hi All,
    I have a requriemnt where i need to make sure there are no special characters allowed
    in a paremeter ( is there any functional module to check it)
    r anyway to work with
    Thank in advance for u replies.
    Regards,
    Riyaz.

    DATA: vergleich_string(100) VALUE
              'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.
      CONCATENATE vergleich_string ' 1234567890,./!@#$%&*-_+=~|\[{]}()"'
                                                   INTO vergleich_string.
    use condition.
    if var ca vergleich_string.
    raise error message.
    endif.

  • Check special characters in a string

    Hi all
    I am using oracle 10g.......
    Need to know what should be the query to check whether a special character exists or not in a column value....used the following query like.....
    select count(*) into emp_no_count_special_char
    from dual
    where REGEXP_LIKE(insert_data_rec.emp_no , '[#!$^&*%./\|]$' )
    or REGEXP_LIKE(insert_data_rec.emp_no , '^[#!$^&*%./\|]' );
    This works fine in case a string starts or ends with a special character ,what if a string of special characters lies in between numeric digits.
    e.g: '100#$%7'
    Please help find a query that checks for the existence of sp. characters irrespective of their position in the column!!!
    Thanks
    Dave
    Edited by: Dave on Jun 6, 2012 5:17 AM
    Edited by: Dave on Jun 6, 2012 5:18 AM

    Hi Dave,
    example below:
    -- Check that at least one special character exists in the string
    SELECT COUNT (*)
      INTO emp_no_count_special_char
      FROM DUAL
    WHERE REGEXP_LIKE (insert_data_rec.emp_no, '[#!$^&*%./\|]');
    -- Check that no special characters exist in the string
    SELECT COUNT (*)
      INTO emp_no_count_special_char
      FROM DUAL
    WHERE NOT REGEXP_LIKE (insert_data_rec.emp_no, '[#!$^&*%./\|]');
    {code}
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to check multiple special characters in instr function sql query.

    Hi,
    The following special characters are comma(,), slash(/), colan(:)
    these special characters i need to be check in instr function.
    select SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) from dual;
    Can you please write the query with right answer.
    Thanks in advance,
    Lakshman.

    Why multiple post?
    How to check multiple special characters in this query.

  • Just a simple check with special characters

    Hi guys and gals,
    i created a boolean method that will check the value of string for any special characters like (/,'%&^# ), what i did is to used indexOf() method. it will return false if the string doesn't have any special character. But, i'm having a problem using the check for the backlslach character ' \ ', since it is considered as escape literal when i put inside indexOf('\'). i really need you help on this.
    if you have other ways to check this kind of character, please put them here. i really need them bady. :D many thanks,

    Look for "\\" or look up the unicode for "\" and use that.

  • Regular expression: check for the presence of special characters.

    I have the following requirement:
    I need to check for the presence of the following characters in a keyword: @, #, > if any of these characters are present, then they need to be stripped off, before going further. Please let me know the regular expression to check for these characters.

    I am trying to extend the same logic for the following characters:
    .,‘“?!@#%^&*()-~<>[]{}\+=`©® . here is the code fragment:
    Pattern kValidator = Pattern.compile("[\\.,\\‘\\“?!@#%^&*()-~<>[]{}\\+=\\`©®]");
    Matcher kMatcher = kValidator.matcher(keyWord);
    if (kMatcher.find(0)) {
    keyWord = keyWord.replaceAll("[.,\\‘\\“?!@#%^&*()-~<>[]{}\\+=\\`©®]", " ");
    }I get the following error. This error is from the weblogic command window. I dont understand these special characters.
    Error:
    28 Oct 2008 12:27:48 | INFO  | SearchController   | Exception while fetching search results in controller:Unclosed character class near index
    39
    [\.,\&#915;Çÿ\&#915;Ç£?!@#%^&*()-~<>[]{}\+=\`&#9516;&#8976;&#9516;«]
                                           ^
    java.util.regex.PatternSyntaxException: Unclosed character class near index 39
    [\.,\&#915;Çÿ\&#915;Ç£?!@#%^&*()-~<>[]{}\+=\`&#9516;&#8976;&#9516;«]
                                           ^
            at java.util.regex.Pattern.error(Pattern.java:1650)
            at java.util.regex.Pattern.clazz(Pattern.java:2199)
            at java.util.regex.Pattern.sequence(Pattern.java:1727)
            at java.util.regex.Pattern.expr(Pattern.java:1687)
            at java.util.regex.Pattern.compile(Pattern.java:1397)
            at java.util.regex.Pattern.<init>(Pattern.java:1124)
            at java.util.regex.Pattern.compile(Pattern.java:817)

  • Checking for Special Characters

    I need to check if a textbox in my form containes special characters (entered by user). If there are any, I need to display an error message.
    I have written a function but it's not working.
    here's my function:
    function checkForSpecialChracters(oFiled)
    var userInput = oFiled.rawValue; // take the String entered by the user
    var iChars = "@#$%^&*+=-[]\\\';,./{}|\":<>?~_";
    for (var i = 0; i < userInput.length; i++)
    if (iChars.indexOf(userInput.charAt(i)) != -1) {
    xfa.host.messageBox("Please check for special characters. The following characters are not allowed: @#$%^&*+=-[]\\\';,./{}|\":<>?~_ ", "Error Message", 3);
    // Change the color of the field
    oFiled.fillColor = "255,100,50";
    Any help would be greatly appreciated.
    Thank you!

    Paul,
    It is working now. I don't know what I might have changed.
    Here's my final function (It works!):
    function checkForSpecialChracters(oFiled)
    var userInput = oFiled.rawValue; // take the String entered by the user
    var iChars = "@#$%^&*+=-[]\\\';,./{}|\":<>?~_";
    var hasSpecialCharacter = false;
    for (var i = 0; i < userInput.length; i++)
    //app.alert("Value is: " + userInput.charAt(i));
    if (iChars.indexOf(userInput.charAt(i)) != -1)
    hasSpecialCharacter = true;
    break;
    } // end if
    } // end For loop
    if (hasSpecialCharacter)
    // Change the color of the field
    oFiled.fillColor = "255,100,50";
    xfa.host.messageBox("Please check for special characters. \n\nThe following characters are not allowed:\n\n @#$%^&*+=-[]\\\';,./{}|\":<>?~_ ", "Error Message", 3);
    else if (!hasSpecialCharacter)
    oFiled.fillColor = "255,255,255";

  • Code to Check for Special Characters \/:*?" | in the given String

    Hi All,
    I need a java code to verify if the given string contains the Special Characters like \/:*?"<>|
    thanks
    krishnaveni

    http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
    bye
    TPD

Maybe you are looking for

  • How to define payment term - Net due 45 days after month end

    Anyone have experience of payment terms such as "Net Due 45 days after Month End"? I'm trying to define payment terms where the amount is due X days after month end. Terms such as 10 days after month end are OK because I can set "Months Ahead" = 1 an

  • Help with magnifier for ipod touch

    Hi Guys I'll start of by saying that i am partially sighted. I have an ipod touch 16gb 1st generation and was wondering if there is a way to get the accessibility options on it. i have used an iphone 4 for a while and the accessibility magnifier is e

  • How to Create multiple rows in Rich table programatically

    Hello ADF Exparts. I am Using below Code to create Rich Table Programatically on Clicking a button but I can't able to Create multiple tables will you please help me to create new row programatically public class NewTable {     private RichInputText

  • Sophos Antivirus version 10 or higher not included in PRUs?

    Hello Novell-Forums. My request regards an update for the ZCMs PRUs in order to discover Sophos Antivirus version 10 or higher. At the moment the Asset Management discovers Sophos only up to version 9,5. All higher Sophos-versions are to be found wit

  • New iPhone 5s and most of my pics in photo albbum show up white, but thumbnails are there

    I just upgraded to the iPhone 5s and after I restored to icloud and went into my pictures, I noticed that most of my pics that would have came from icloud are all showing up white (blank).  When I click on the white pic, it says "downloading" but not