I try to use regex to delete the last n characters from a string.
My input: azerty
My expected Output: azer
I want to have a regular expression that does this.
You want to use this regular expression (try and view an explanation it online):