Comparison of various regexp syntax:
Regexp Syntax Summary
Learn about Perl regexp:
perlrequick,
perlretut,
perlre
vim: I began learning about regular expressions from using Vim's regexp, and I can attest to its flexibility + features. When you say
vi, you're most likely using
vim in vi-compatible mode - so don't limit yourself and do enable Vim's full features (with
:set nocp). Vim allows you to visually learn about regexp matching with highlighted search:
:set hlsearch
:set incsearch
sed: You can replace
sed commands with
perl. You're better off in the long run learning Perl, IMHO.
grep: Beyond simple regexp, there's
ack - use Perl regular expressions!