fix the error message so it is the same as the regex issue #1999

The error message is wrong, fixing it.