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


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

Oh wise Bill... your solution worked. One more related question. I need to trim the last few characters which could be either CISD or ISD, so that 'TestISD' becomes 'Test' and 'DevelopmentCISD' becomes 'Development'. What wisdom can you impart upon this poor soul?

  • Comment on Re^2: How to get substring between first and second character

Replies are listed 'Best First'.
Re^3: How to get substring between first and second character
by Kenosis (Priest) on Jan 17, 2013 at 20:52 UTC

    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.