replaced variable-lookup with regexp