I have an activity where the students have to find the missing coordinate in a solution to a linear equation. I’m programming feedback to pop up depending on their answer.

I’d like them to be able to enter just the missing coordinate OR the entire coordinate point. However, I’m anticipating that some of them might add an extra space in between the (-6, 8) and I’d like the code to recognize that as a correct answer. Unfortunately, I can’t use the \\ for the extra space because it’s in parentheses. So x and y are showing up as correct answers, but z is not.

x=this.submitted and this.latex="-6"

y=this.submitted and this.latex="\left(-6,8\right)"

z=this.submitted and this.latex="`\left(-6,\\ 8\right)`

"

Any ideas on how to fix this issue? Thanks in advance!