title: Replace a string from python df issue
body: <p>I am trying to separate few string from  pandas dataframe :</p>
  
  <pre><code>x = pd.DataFrame()
  x['y'] = ["Hernia|Infiltration","A|Hernia|Infiltration","Infiltration|Hernia"]
  x
  </code></pre>
  
  <p>I am executing below code :</p>
  
  <pre><code>x['y'] = x['y'].replace({'|Hernia': ''},regex=True)
  x['y'] = x['y'].str.replace('Hernia|', '',regex=True)
  x
  </code></pre>
  
  <p>But output is wrong :</p>
  
  <p>wrong output :</p>
  
  <pre><code>     y
  0   |Infiltration
  1   A||Infiltration
  2   Infiltration|
  </code></pre>
  
  <p>Correct/ Expected output  </p>
  
  <pre><code>     y
  0   Infiltration
  1   A|Infiltration
  2   Infiltration
  </code></pre>
  
  <p>There can be any string in place of A and Infiltration , but pattern would be same.</p>