Afficher un message
Vieux 23/08/2006, 16h52   #7
Dave S.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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'


  Réponse avec citation
 
Page generated in 0,05111 seconds with 9 queries