Non-greedy regex support

closes #1248