Lesson

Find One or More Criminals in a Hunt, Regular Expression Greedy Match Lesson

Lesson Summary

In this lesson, we look at using a regular expression to match a group of "C" characters that represent criminals. We are able to find one or more matches of the "C" character by utilizing the plus character (+). Using the addition character allows us to target the "C" character whenever it appears one or more times in a sequence. If it appears more than one time in a row then it will match the regular expression. In this case, we are able to use the regex /C+/ to find the series of "C" characters within a string. These "C" characters represent the criminals we are hunting.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: