Simplify fragments and switch to using forward regexes