As we continue exploring Ruby one-liner alternatives to UNIX command-line operations, today we tackle a common case: a combination of grepping through multiple files, and collating the results.
Tag: regex

Episode #638
Ruby as a Filter
Learn how Ruby's -p flag along with a bunch of handy shortcuts can take a script's worth of text filtering and shrink it to a one-liner!

Episode #634
You Could Have Sed It in Ruby
Don't spend time mastering UNIX tools if you can use Ruby one-liners instead.

Episode #608
Composed Regex
Regular expressions can quickly grow to be large, dense, and impenetrable. In today’s episode you’ll learn how Ruby helps you compose them out of smaller, manageable pieces!

Episode #604
Extended Regex Syntax
Regular expressions are sometimes accused of being a write-only language. Learn how to clarify your patterns with Ruby's extended regex syntax!

Episode #493: Special Variables Part 3: Regex Matching
Learn about one final category of Ruby's Perl-style special variables, and some guidelines for using them.

Episode #424: Rake Regex Rule
In this episode we'll learn to use advanced Rake rules to define and track arbitrarily complex file dependencies.

Episode #406: Last Match
In this episode, we get lazy and lean on the information that Ruby captures about regex matches.