I oppened an XML file in VSCode.
VSCode warned me that there are unusual line terminators, like
Using utilities bundled with git bash for windows, or python, how can I find all paragraph separator characters in a file ?
CodePudding user response:
I'm not 100% sure what you are asking for but a good regex should do the job.
CodePudding user response:
This should work in bash, where unicode can be printed like $'\u2029
:
sed $'s/\u2029/HERE(&)/g' file.xml
&
is replaced with the paragraph separator. In a terminal it will probably just look likeHERE()
.Or maybe use
sed $'s/\u2029/HERE/g'
in case it messes up the terminal.grep $'\u2029'
will list lines containing them.
There's also
hd file.xml | grep --color=always 'e2 80 a9'
You can delete them permanently with:
sed -i $'s/\u2029//g' file.xml