Fix for redmine #2626. Array keys are not constrained to 126 characters

Changing scanf with regexp matching. It's more precise and with less headache.

The main reason though is to use the global CF_MAXVARSIZE as the maximal size of a key and not the 127 limit.