Interval Notation for a Union

I am in over my head, knowing very little about CL. But. My students are learning to write intervals of increase/decrease or positive/negative values for polynomial functions, and I am building a Desmos activity that will check their answers. When the answer is a single interval, such as (-3,-1), I have no problem. On a math input screen, I used

correct = input1.submitted and input1.latex = “\left(-3,-1\right)”
correct: correct

and answers checked perfectly. But a problem occurs when I need a union of two or more intervals, such as (-3,-1)U(5,6). I tried using

correct = input7.submitted and input7.latex = “\left(0,1\right)\bigcup\left(5,6\right)”
correct: correct

and having students just cut and paste a U symbol that I provided in the activity. It didn’t check correctly. I also tried \cup. Then I tried to insert the word or as follows

correct = input7.submitted and input7.latex = “\left(0,1\right)or\left(5,6\right)”
correct: correct

but it was recognized as latex (?) and when students enter a space before and after the word, it doesn’t check correctly.

How can I get the pasted U symbol to check correctly? I want students to enter answers in the format (-3,-1)U(5,6). Thanks for helping a newbie!

I ran into this issue with non-linear inequalities, and I ended up using multiple choice for this. The code is a little heavy, but you should be able to adapt it using the hide answers table.

Thank you! I actually viewed your activity earlier today while searching for answers. I love the idea of using buttons and will have to try adapting the CL.