Slicing and dicing data with regular expressions

Express Yourself

Regular expressions are extremely powerful. Virtually every Linux command that processes text supports them in one form or another. Most shell command syntax also expands regular expressions to match file names, although the operators might function differently from shell to shell. For example, ls finds the files a, b, and c; ls * finds all file names that begin with a, b, or c. Here, the * does not modify as in grep; rather, * is interpreted as .*. The ? operator works in the shell, too, but matches any single character. Check the docs for your favorite utility to see what is supported.

Infos

  1. Perl documentation: http://perldoc.perl.org/
  2. Friedl, Jeffrey. Mastering Regular Expressions. Apress, 2004
  3. Goog, Nathan. Regular Expression Recipes, 2nd ed. O'Reilly Media, 2006

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content