# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"[.?!;\n\"]"
test_str = ("ì¡°ì„ ì¤‘ì•™í†µì‹ ì€ 7ì¼ ê¹€ì •ì¼ êµë°©ìœ„ì›ìž¥ì´ 마무리 ë‹¨ê³„ì¸ ë¡€ì„±ê°• ì²ë…„2í˜¸ë°œì „ì†Œ ê±´ì„¤í˜„ìž¥ì„ í˜„ì§€ì§€ë„ í–ˆë‹¤ê³ ì „í–ˆë‹¤. ê¹€ 위ì›ìž¥ì€ ?공사 ìƒí™©ì„ ë³´ê³ ë°›ê³ í˜„ìž¥ì„ ë‘˜ëŸ¬ë³¸ ë’¤ \n"
" \\\"례성강 ì²ë…„2í˜¸ë°œì „ì†ŒëŠ” ìš°ë¦¬ì˜ í›„ëŒ€ë“¤ì—게 ë¬¼ë ¤ì¤„ 나ë¼ì˜ 귀중한 재부ì´ë©°, 먼 í›—ë‚ ì— ê°€ì„œë„ ì†ìƒ‰ 없게 ê±´ì„¤ì˜ ì§ˆì„ ìµœìƒì˜ 수준ì—서 보장해야 한다\\\"면서 \\\"ëª¨ë“ ì „ì„ ì—서 ëŒ€ì§„ê³µì „ì„ ê³¼ê°ížˆ ë²Œë ¤ ë¯¼ì¡±ì‚¬ì— ì¼ì°ì´ ì—†ì—ˆë˜ ì„¸ê¸°ì ì¸ ìœ„ì—…ì„ ì´ë£©í•˜ìž\\\"ê³ ë§í–ˆë‹¤ê³ í†µì‹ ì€ ë³´ë„했다.\n")
subst = ""
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 0)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
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 Python, please visit: https://docs.python.org/3/library/re.html