Easy
Count Words with Regex
Count the words in a line, where a word is a run of letters (use
[A-Za-z]+).Input
One line.
Output
A count.
Sample 1
Input
Hello, world! It's 2026.
Output
4
Sample 2
Input
123
Output
0
Output appears here[A-Za-z]+).One line.
A count.
Hello, world! It's 2026.
4
123
0
Output appears here