clarify regexp and correct some bad backtracking