Fix #171 Avoid using RegExp.$n