Menu
CoddyTech

Capitalized Words

Lesson 28 of 28 in Coddy's RegEx in Python course.

challenge icon

Challenge

Medium

Write a function named extract_capitalized_words that takes a text string as input and returns a list of all words that start with a capital letter.

Try it yourself

import re

def extract_capitalized_words(text):
    # Write code here

All lessons in RegEx in Python

Practice on your own: Online Python compiler

Test a pattern on your own text: Regex Tester