regular expression for disregarding last x characters

Viewed 12

For my data I have a list of locations, here are a few examples:

enter image description here

Now I need two regular expressions, one which disregards the last character (so D13211B becomes D13211)

and one which disregards the last two characters (so D03801C becomes D0380).

I've been trying out several ways but can't seem to find out how to do it properly. Any help is appreciated!

0 Answers
Related