I have some sample strings like this:
AA240531C00040000
ABCD240531C00040000
AB2CD240531C00040000
ABCD1240531C00040000
So for any length of the string, I need to chop off the last 15 chars and return the rest.
- AA240531C00040000
- ABCD240531C00040000
- AB2CD240531C00040000
- ABCD1240531C00040000
so what I would get is:
AA
ABCD
AB2CD
ABCD1
Things I have tried so far:
These two do the same, they return the 15 chars instead of everything but the last 15 chars:
...............()$
...............$
This selects everything up until the first occurrence 15
.+(?=15)
This sort of works but my app that takes this regex expression craps out due to invalid number of characters. Not sure why.
^(.*)...............$
1