title: Remove last character every line using regex
body: <p>I have the <a href="https://regex101.com/r/nK6pG7/3" rel="nofollow">following regex</a>:</p>
  
  <pre><code>\|.*
  </code></pre>
  
  <p>With this, regex, I'm trying to remove last characters in </p>
  
  <pre><code>34102103|BLK|2|12|23|9|0|46
  34102103|DNY|50|50|50|50
  35102100|BLK|3|1|12
  35102100|CEM|0|0|0|10|5|0|15
  </code></pre>
  
  <p>I want my output like this:</p>
  
  <pre><code>34102103|BLK|2|12|23|9|0
  34102103|DNY|50|50|50
  35102100|BLK|3|1
  35102100|CEM|0|0|0|10|5|0
  </code></pre>