views:

182

answers:

1

I need to remove bullet symbols from text pasted from MS Word, but I can't figure out what to match on.

When printed to STDOUT the symbol displays as ⢠The ascii codes for these characters are 194 and 162. The ascii code for • symbols is 149

Any suggestions how to proceed either in JavaScript or Ruby code?

A: 

In ruby, you should be able to use something like:

mystring.gsub(/[\xxx]/,'whatever')

where xxx is the character code you are looking for. You can see what that code is by just doing a puts mystring in irb and it should show you

tanguyr