#
# µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020)
# LAB 9-5 Çлç ÄÚµå ÃßÃâÇϱ⿡ µµÀüÇÏÀÚ, 239ÂÊ
#
import re
# ¸ÖƼ¶óÀÎ ÅؽºÆ®´Â ¼¼ °³ÀÇ µû¿ÈÇ¥¸¦ »ç¿ëÇÏ¿© Ç¥ÇöÇÑ´Ù
text = '''101 COM PythonProgramming1
102 MAT LinearAlgebra
103 ENG ComputerEnglish'''
# Python Part1°ú °°ÀÌ ¼ýÀÚ°¡ Ç¥ÇÔµÈ ¹®ÀÚ°¡ ÀÖÀ» °æ¿ì
# ¾ËÆĺª ¹®ÀÚ³ª Áٹٲ޹®ÀÚ(\n)ÀÌ ¾Æ´Ñ ¼ø¼öÇÏ°Ô ¼ýÀڷθ¸ ÀÌ·ç¾îÁø ´Ü¾î¸¦ ÃßÃâÇÏ´Â Á¤±Ô½Ä
s = re.findall('[^a-zA-Z\\n]\d+', text)
print(s)
# Çмö¹øÈ£°¡ ¹Ýµå½Ã ¼¼ÀÚ¸® Á¤¼öÀÏ °æ¿ì ´ÙÀ½°ú °°Àº ¹æ¹ýµµ °¡´ÉÇÔ
s = re.findall('\d{3}', text)
print(s)