Fix bug: first backreference in regex is 1 not 0