title: How to delete n characters from string with regex
body: <p>I try to use regex to delete the last n characters from a string.
  For example: </p>
  
  <p>My input: <code>azerty</code><br>
  My expected Output: <code>azer</code></p>
  
  <p>I want to have a regular expression that does this.</p>