Current Position:Home > Just a simple check with special characters

Just a simple check with special characters

Update:11-30Source: network consolidation
Advertisement
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,

The Best Answer

Advertisement
Look for "\\" or look up the unicode for "\" and use that.
  • Just a simple check with special characters Update:11-30

    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 havin

  • Check on special characters Update:10-11

    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)

  • How to check multiple special characters in instr function sql query. Update:10-11

    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 answ

  • Checking for Special Characters Update:11-30

    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

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

    Hi All, I need a java code to verify if the given string contains the Special Characters like \/:*?"<>| thanks krishnavenihttp://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html bye TPDRead other 2 answers

  • How to check multiple special characters in this query. Update:10-11

    When the master_title has no comma in it, I am getting an empty master_title. This is because INSTR(master_title,',',1,1) is returning 0. In addition, I want to be able to specify other characters besides the comma. Example: ":" "/" &q

  • Special Characters Check in OBPM Update:11-30

    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 Spe

  • 0CUSTOMER Special Characters Error in Load Update:10-11

    Hi Experts,     I am loading Customer Master data from R/3 into BW via 0CUSTOMER_ATTR extractor. Some user-entered fields in R/3 such as NAME, NAME1, STREET etc have some special characters - which look like a square. This data used to come over into

  • A name should not start with any special characters Update:10-11

    I need to put a condition in iF statement such that a name that is given by the user should not start with any special charecters.A dialog box should display indicating this conditon.Can u plz give sample code for this.My code is as below. //text box

  • Error of Special Characters in Export to Excel Update:11-30

    Hi, I guess the error you are getting is a Parser error. To solve this problem, before putting the data on the XML file, you have to pass the data through an encoding process. For UTF-8 the code for encoding should be something like.   public java.la