New extension: Multiple Matches (grep)

The next extension for the grep challenge is now live: Multiple Matches.

This extension introduces the -o flag (–only-matching), which prints just the portion of each line that matches the pattern, rather than the entire line.

By the end of this extension, your grep implementation will support printing only the matched text.

$ echo -n "The king had 10 children" | grep -o -E '\d'
1
0

Here’s the stage breakdown:

Please give this a try and let us know how it can be improved! @UdeshyaDhungana (author of this extension) and I will be available here to help out with any tester or instruction-related issues.