How to select every second occurance using regular expression
===

I`m writing jquery code which would remove every second occurance of character " | " in the code.
Having troubles with writing regular expression for it.

How to specify every second occurance of " | " using regular expressions?