Page 47 of the manual says "STR must be followed by a backslash and a number that specifies how many
characters (bytes) to collect."

So, as I understand it, it should be a number, not a variable.

If you want to change that on the fly, then Henrik's loop is the way to go.

Ioannis