title: How to globally replace pipe symbol "|" in string
body: <p>How can I globally replace the <code>|</code> (pipe) symbol in a string? When I try to replace it with <code>"so|me|str|ing".replace(/|/g, '-')</code>, I get <code>"-s-o-|-m-e-|-s-t-r-|-i-n-g-"</code></p>