8

Is there a good tutorial on using regular expressions, especially with grep? I tried googling for some, but most tutorials are too basic and cover things I already know.

hhafez
  • 38,949
  • 39
  • 113
  • 143

2 Answers2

6

Regular-expressions.info has a tutorial section. This site is pretty comprehensive for regular expressions in general, although the emphasis is on support in scripting and programming languages.

The J. Friedl book on mastering regular expressions (mentioned elsewhere), is definitely an outstanding resource, and essential reading if you are serious about doing what the title says.

Anyone who uses regular expressions routinely, or as part of their job, would do well to pick up the book. Browsing around for tutorials is not really conducive to proficiency, in regex-land.

dreftymac
  • 31,404
  • 26
  • 119
  • 182
1

Here is an introductory article. Here are some other tutorials.

The definitive book is Mastering Regular Expressions by J. Friedl:

alt text http://ecx.images-amazon.com/images/I/51fSgodb1uL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg

Federico A. Ramponi
  • 46,145
  • 29
  • 109
  • 133