title: REGEX in perl, start matching from the n occurrence of elem e
body: <p>i need your help with some regex. I have a .csv file with fields separated with pipes and i want a regex that starts working from the n occurrence of that pipe and delete the element after including the next '|' . For Example, start from the third pipe:</p>
  
  <pre><code>elem1 | elem2 | elem3 | elem4 | elem5 | elem6
                    ^
  </code></pre>
  
  <p>delete result:</p>
  
  <pre><code>elem1 | elem2 | elem3 | elem5 | elem6
  </code></pre>
  
  <p>Hope you understand my problem. Thanks</p>