RegEx to replace html entities

Posted by DeltaFox on Stack Overflow See other posts from Stack Overflow or by DeltaFox
Published on 2010-12-29T03:50:09Z Indexed on 2010/12/29 3:54 UTC
Read the original article Hit count: 275

Filed under:
|
|

Hi, all. I'm looking for a way to replace the bullet character in Greasemonkey. I assume a Regular Expression will do the trick, but I'm not as well-versed in it as many of you.

For example, "SampleSite.com • Page Title" becoming "SampleSite.com Page Title". The issue is that the character has already been parsed by the time Greasemonkey has gotten to it, and I don't know how to make it recognize the symbol.

I've tried these so far, but they haven't worked: newTitle = document.title.replace(/•/g, ""); newTitle = document.title.replace("•", ""); //just for grins, but didn't work anyway

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html