Re: sed: How do you match a string containing square brackets AND hyphens?
Okay, I see from Stephane's example that the left square bracket ([)
can be included in the list like any other character.
So what I have to do is:
1. Make the closing square bracket the first character in the list.
2. Make the hyphen the last character in the list.
3. Put the opening square bracket somewhere in the middle.
THANKS EVERYONE!
Stephane Chazelas wrote:
> $ echo '[]-' | sed 's/[][-]/+/g'
|