fix multiple occurrence of @ variables
fix multiple occurrence of @ variables

regex_match() only returns first match, so it must be called in a loop.
If a environment variable contains a newline the result is not as
desired. This patch limits the env variable on first line.

Signed-off-by: Denis Osterland-Heim <a2cd738820c6ad1e944e890109020b832855bbcf@diehl.com>

NXPmicro/mfgtools,NXPmicro/mfgtools,NXPmicro/mfgtools