Given the string
170905-CBM-238.pdf
I'm trying to match 170905-CBM
and .pdf
so that I can replace/remove them and be left with 238
.
I've searched and found pieces that work but can't put it all together.
This-> (.*-)
will match the first section and
This-> (.[^/.]+$)
will match the last section
But I can't figure out how to tie them together so that it matches everything before, including the second dash and everything after, including the period (or the extension) but does not match the numbers between.
help :) and thank you for your kind consideration.