added test for tokens that contain re characters
"fixed typo in error string variable name