This discussion is archived
4 Replies Latest reply: May 12, 2011 4:36 PM by user331927 RSS

Pattern match on hex code

user331927 Newbie
Currently Being Moderated
Can anyone tell me how to match a hex character with the hex code "0xA2" where 0xA2 = ò

Pattern p = Pattern.compile("\\xA2");
Matcher m = p.matcher("aaaaabò");
boolean b = m.matches();

Can anyone tell me why the above code doesn't work?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points