Why is my script’s regex having its backslash removed?

Why is my script’s regex having its backslash removed?