id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

tmhscs@gmail.com regex > regex_countNumberOfVowels
prev  |  next  |  chance

Given a String containing some text, return the number of vowels in the String by using a regular expression and counting the number of matches. Vowels are A, E, I, O, U, a, e, i, o, u.


regex_countNumberOfVowels("Computer") → 3
regex_countNumberOfVowels("Science") → 3
regex_countNumberOfVowels("Computer Science") → 6

...Save, Compile, Run (ctrl-enter)

public int regex_countNumberOfVowels(String text) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy