fix regex index