Skip to main content
fixed spelling and formatting
Source Link
anon
anon

I am looking for the sed command to replace text like this "[word1 word2]" to nothing.

I tried **

sed -i -e 's/[Word1 Word2]//g'

sed -i -e 's/[Word1 Word2]//g'

** itIt didn't work and replaced entire my text in disorder way.

I would like to request you to help me to replace special characters like these.

Thanking you, Punith.

I am looking for the sed command to replace text like this "[word1 word2]" to nothing.

I tried **

sed -i -e 's/[Word1 Word2]//g'

** it didn't work and replaced entire my text in disorder way.

I would like to request you to help me to replace special characters like these.

Thanking you, Punith.

I am looking for the sed command to replace text like this "[word1 word2]" to nothing.

I tried

sed -i -e 's/[Word1 Word2]//g'

It didn't work and replaced entire my text in disorder way.

I would like to request you to help me to replace special characters like these.

Thanking you, Punith.

Source Link
Punith
  • 31
  • 1
  • 1
  • 4

SED command to replace "[Word1 Word2]" to nothing

I am looking for the sed command to replace text like this "[word1 word2]" to nothing.

I tried **

sed -i -e 's/[Word1 Word2]//g'

** it didn't work and replaced entire my text in disorder way.

I would like to request you to help me to replace special characters like these.

Thanking you, Punith.