I have a string that i am want to remove punctuation from.
I started with
sed \'s/[[:punct:]]/ /g\'
But i had problems on HP-UX n
You can do it manually:
sed 's/[][\/$*.^|@#{}~&()_:;%+"='\'',`>!-]/ /g'
This remove the 32 punctuation character, the order of some characters is important:
-
should be at the end like this -]
[]
should be like that [][other characters]
'
should be escaped like that '\''
^
like in [^
[.
[=
[:
and end with .]
=]
:]
$]
here you can have explication of why all that http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_03