Challenge: Find Words Starting with a Specific Letter
You will write a function that extracts all words starting with the uppercase letter 'A' from a given string. This exercise will help you practice using basic regular expression patterns and Python's re module. Only words beginning with a capital 'A' should be matched—the search must be case-sensitive.
Key Points:
- Use Python's
remodule; - Match only words that start with uppercase 'A';
- Preserve the original form of each matched word from the text.
Swipe to start coding
Write a function to extract all words that start with the uppercase letter A from a given string using regular expressions. Only words beginning with a capital A should be included in the result. The search is case-sensitive. Return the words exactly as they appear in the input text.
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Can you show me an example input and expected output?
What should the function return if there are no matching words?
Should punctuation attached to words be included or ignored?
Awesome!
Completion rate improved to 6.67
Challenge: Find Words Starting with a Specific Letter
Veeg om het menu te tonen
You will write a function that extracts all words starting with the uppercase letter 'A' from a given string. This exercise will help you practice using basic regular expression patterns and Python's re module. Only words beginning with a capital 'A' should be matched—the search must be case-sensitive.
Key Points:
- Use Python's
remodule; - Match only words that start with uppercase 'A';
- Preserve the original form of each matched word from the text.
Swipe to start coding
Write a function to extract all words that start with the uppercase letter A from a given string using regular expressions. Only words beginning with a capital A should be included in the result. The search is case-sensitive. Return the words exactly as they appear in the input text.
Oplossing
Bedankt voor je feedback!
single