Network disconnected
Description
연속된 영어 소문자를 찾으려면 어떻게 할까요?
- 소문자를 뜻하는
[a-z]
와 - 반복을 뜻하는
+
를 붙여 =>[a-z]+
를 씁니다.
빈칸에 [a-z]+
를 입력하고 [실행]해 보세요. Output으로 search_target에 들은 모든 연속된 소문자가 한 줄씩 나올 겁니다.
Question type: Fill in the blank
- You need to fill in the blank with the appropriate code.
- You cannot modify the given code.
- An error message will appear in the result if you leave the blank empty.
1
2
3
4
5
6
7
8
9
10
11
# 빈칸에 정규표현식을 적습니다.
regex = r''
search_target = '''Luke Skywarker 02-123-4567 luke@daum.net
다스베이더 070-9999-9999 darth_vader@gmail.com
princess leia 010 2454 3457 leia@gmail.com'''
# 정규표현식과 일치하는 부분을 모두 찾아주는 파이썬 코드입니다.
import re
result = re.findall(regex, search_target)
print("\n".join(result))
Result
Stop
Result of [Run Test] or [Submit] will be displayed here
내가 제출한 코드가 왜 틀렸는지 프로그래머스 AI에게 물어보세요.
제출 후 채점하기를 눌러 30점 이상인 경우 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.