import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "[.?!;\\n\"]";
final String string = "ì¡°ì„ ì¤‘ì•™í†µì‹ ì€ 7ì¼ ê¹€ì •ì¼ êµë°©ìœ„ì›ìž¥ì´ 마무리 ë‹¨ê³„ì¸ ë¡€ì„±ê°• ì²ë…„2í˜¸ë°œì „ì†Œ ê±´ì„¤í˜„ìž¥ì„ í˜„ì§€ì§€ë„ í–ˆë‹¤ê³ ì „í–ˆë‹¤. ê¹€ 위ì›ìž¥ì€ ?공사 ìƒí™©ì„ ë³´ê³ ë°›ê³ í˜„ìž¥ì„ ë‘˜ëŸ¬ë³¸ ë’¤ \n"
+ " \\\"례성강 ì²ë…„2í˜¸ë°œì „ì†ŒëŠ” ìš°ë¦¬ì˜ í›„ëŒ€ë“¤ì—게 ë¬¼ë ¤ì¤„ 나ë¼ì˜ 귀중한 재부ì´ë©°, 먼 í›—ë‚ ì— ê°€ì„œë„ ì†ìƒ‰ 없게 ê±´ì„¤ì˜ ì§ˆì„ ìµœìƒì˜ 수준ì—서 보장해야 한다\\\"면서 \\\"ëª¨ë“ ì „ì„ ì—서 ëŒ€ì§„ê³µì „ì„ ê³¼ê°ížˆ ë²Œë ¤ ë¯¼ì¡±ì‚¬ì— ì¼ì°ì´ ì—†ì—ˆë˜ ì„¸ê¸°ì ì¸ ìœ„ì—…ì„ ì´ë£©í•˜ìž\\\"ê³ ë§í–ˆë‹¤ê³ í†µì‹ ì€ ë³´ë„했다.\n";
final String subst = "";
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(string);
// The substituted value will be contained in the result variable
final String result = matcher.replaceAll(subst);
System.out.println("Substitution result: " + result);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html