Home:ALL Converter>replacing special characters using SED

replacing special characters using SED

Ask Time:2018-12-13T20:50:49         Author:spectrum

Json Formatter

I am having following fields and using SED i need to remove special characters to remove [ ] with space

Retrieve [File
Monitor [FW] end
Monitor [FW] start
Monitor [DR] end
Monitor DR] start
Open File
Set Password
Logon
Logoff
Monitor Backup] end
Monitor Backup] start
Auto Clear] History end
Auto Clear] History start
Old [Backup Deletion End

I have used following SED command

 "s/(\[\w+\])|(\w+\[)|(\w+\])/ /g"

But it is skipping the one with no special characters

Author:spectrum,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53762272/replacing-special-characters-using-sed
yy