No, my script (which works, I tested it) is searching for a text variable followed by a number.
It looks like you retyped the script because the line quoted in the error message is not right. You have a minus sign where there should be an equals.
Dave