From d4e8737175afe8f6c887384dff3253f0637f42ef Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Thu, 25 Mar 2021 11:54:14 +0100 Subject: Add sed backreferences --- sed.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sed.md b/sed.md index e2cc9bd..3122058 100644 --- a/sed.md +++ b/sed.md @@ -7,3 +7,7 @@ Typical substitution: Can do multiple: sed -e 's/pattern/replacement/flags; s/bla/ble/' + +Back references require extended regexes: + + sed -r -e 's/"(\w+)"/\1/' -- cgit v1.2.3