String Regular Expression for uncommon characters
Hi,
I am trying to get text out of HTML file for which I am using EditorKit and Document classes. After I obtain the text, the text (String) contains some characters like?/b>. This character looks likea with French styleacute accent . My problem is how to use regular expression to find and replace (replaceAll method) these unwanted characters.
Is there a regular expression pattern for such characters?
Thanks!
Rahul.
hrm I would recommend looking at the specific patterns,
a simplified site would be here http://www.p3m.org/wiki?regex
as a refernce . If you dont know regular expression, use
http://www.perl.com/doc/manual/html/pod/perlre.html
The only way I could think of constructing the regex is to use the \s and add the characters you want in that regex :s you could look into regex look ahead and look behind methods...
m0Oa at 2007-7-15 15:36:21 >

OK, I did test it, and it works:String in = "gar\u00e7on";System.out.println(in);in = in.replaceAll("\u00e7", "c");System.out.println(in);Trivial.