title: How to remove multiple pipes in data frame?
body: <p>Here is simple example</p>
  
  <pre><code>library(dplyr)
  library(stringr)
  
      &gt; dataf &lt;- data_frame(text = c('this is a pip||e |' ,
  +                              'this is |||'))
  &gt; dataf
  # A tibble: 2 x 1
                  text
                 &lt;chr&gt;
  1 this is a pip||e |
  2        this is |||
  </code></pre>
  
  <p>I want to replace all the pipes in the data with an empty string. Basically I want them to disappear. However, I am only able to get rid of one of them at a time:</p>
  
  <pre><code>     &gt; dataf %&gt;% mutate(text = str_replace(text, '\\|+', ""))
  # A tibble: 2 x 1
                text
               &lt;chr&gt;
  1 this is a pipe |
  2         this is
  </code></pre>
  
  <p>What is wrong here?
  Thanks!</p>