remove optional / after /a in regex statement