Bharath Thati
Bharath Thati

Reputation: 1

Unterminated Regex Linux

I am trying to replace text that matches a Regex with space. The command I am trying to run is:

sed -i '(\[^\x00-\x7F^\p{L}\]+)/ /g' abc.txt

The error Im receiving is sed: -e expression #1, char 31: unterminated address regex.

I have escaped the [,] with \ [ and \ ] and still the same error. Need your suggestions

Upvotes: 0

Views: 91

Answers (1)

silgon
silgon

Reputation: 7221

I think you forgot the first / for the replacement command. You could try something like:

sed 's/(\[^\x00-\x7F^\p{L}\]+)/ /g' abc.txt

Or at least it might give you an idea.

Upvotes: 0

Related Questions