[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Backreferences in character classes?

From: Jack Bates
Subject: Backreferences in character classes?
Date: Fri, 19 Jan 2018 14:25:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Does sed support backreferences in character classes? The following doesn't work for me:

echo "'foo'\"'\"'bar'" | sed "s/\([\"']\)\([^\1]*\)\1/\2/g"
Expected: foo'bar
Actual: foo'"'"'bar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]