Trouble replacing a "||"

Hello,

in some of my log lines, I have two pipes following each other but between is supposed to be a field. Processing this particularity with my grok pattern doesn't do the trick. I've tried the following:
gsub => ["temp_field" , "||" , "|-|"]
gsub => ["temp_field" , "||" , "|-|"]
gsub => ["temp_field" , "||" , "||"]
gsub => ["temp_field" , "||" , "|
|"]
gsub => ["temp_field" , "||" , "|_|"]

with the last one, it changes my field by adding exactly "||" sequence but the point is to have "||". I'm struggling with this for quite some time.

Do anyone have a solution for this?

Thanks in advance,
Noemie