http://www.perlmonks.org?node_id=1013890


in reply to Re^2: How to get substring between first and second character
in thread How to get substring between first and second character

s/C?ISD$// on the captured string, or modifying BillKSmith's regex (assuming those endings are in the the original strings) to /_(.+?)C?ISD_/ would work.