Using Core API
String body = "\n";
String out;
Pattern pattern = Pattern.compile("class=\".*?\"");
Matcher matcher = pattern.matcher(body);
out = matcher.replaceAll("");
System.out.println(out);
Using Jakarta ORO
String body = "\n";
String out;
Perl5Util util = new Perl5Util();
out = util.substitute("s/ class=\".*?\"//g", body);
System.out.println(out);
No comments:
Post a Comment