removing finite loop in scriptletprint parser, by using a non-greedy regex