Track Ruby
Ruby track

Grep

An exercise from the Ruby track
hard

About this exercise

Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.

files
parsing
pattern matching
regular expressions
strings
text formatting
View all solutions