in reply to Get a known substring from a string
This sounds as a XY Problem to me, and I suspect that you want to do Z, of which you haven't told us anything.