regex add before/after fix