fix position regex matches