fixed error regexp match index