bug-grep
[Top][All Lists]
Advanced

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

bug#33418: Convert from literal string to ERE?


From: Peng Yu
Subject: bug#33418: Convert from literal string to ERE?
Date: Sat, 17 Nov 2018 22:05:06 -0600

Hi,

I'd like to create an ERE expression for any literal string. I found
that "sed -e 's/\([][?+{|()\]\)/\\\1/g' " seem to work.

For example,
sed -e 's/\([][?+{|()\]\)/\\\1/g' <<< '\?+{|()[]'

Could anybody help confirm whether this will work for all the cases? Thanks.

-- 
Regards,
Peng





reply via email to

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