Regular Expression

Match/Replace/Extract with grep, perl, sed,awk, python

Vince
vswe
3 min readSep 13, 2020

--

General Rule

Text content

Match one character . [] [^]

Anchors Position (Head/End) ^$

Count []{} * +

Numbers or letters

Match text

with grep

with perl

with vim

with python

Replace

with sed

with vim

Group & Extract Substring

with python

with sed

with grep

with awk

--

--