영어 문장속 숨어있는 니모(Nemo)를 찾아보자. 니모를 찾는데 있어서 대소문자는 중요하지 않다.

입력

여러 문장이 각 줄로 입력되며, 입력의 마지막에는 "EOI" 입력된다. 한 줄은 최대 80개의 글자로 이루어져 있다.

출력

숨겨진 니모를 찾으면 “Found”, 못찾으면 “Missing”를 각 줄에 맞게 출력하면 된다.

예제 입력 1 복사

Marlin names this last egg Nemo, a name that Coral liked.
While attempting to save nemo, Marlin meets Dory,
a good-hearted and optimistic regal blue tang with short-term memory loss. 
Upon leaving the East Australian Current,(888*%$^&%0928375)Marlin and Dory
NEMO leaves for school and Marlin watches NeMo swim away.
EOI

예제 출력 1 복사

Found
Found
Missing
Missing
Found

 

 

문제풀이

import re

while True :
    input_string = input()
    if input_string == "EOI" :
        break
    regex = re.findall("([nN][eE][mM][oO])", input_string);
    if len(regex) >= 1 :
        print("Found")
    else :
        print("Missing")

 

[백준 | 브론즈2] 니모를 찾아서(정규식-대소문자 구분없이 단어 찾기)