meta-google: gbmc-ncsi-config: ip-from-ra: Fix regex

Our current regex for looking at the DNS search list for a valid
hostname is not quite correct if there is any extra space in the text
output due to the program outputting extra spaces for single item lists.

Tested: Hostname is parsing correctly again on a smartnic platform.

Change-Id: Ibf267b63d5399049b9746b28da124e712c33a144
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
index bf1c441..4aae5c8 100755
--- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
@@ -75,7 +75,7 @@
       (( t_pfx_b[9] |= 1 ))
       hextet="fd$(printf '%02x' "${t_pfx_b[9]}")"
       pfx="$(ip_bytes_to_str t_pfx_b)"
-    elif [[ "$line" =~ ^'DNS search list'' '*:' '*([^.]+)(.*[.]google[.]com)$ ]]; then
+    elif [[ "$line" =~ ^'DNS search list'' '*:' '*([^.]+)(.*[.]google[.]com)' '*$ ]]; then
       # Ideally, we use PCRE and with lookahead and can do this in a single regex
       #   ^([a-zA-Z0-9-]+(?=-n[a-fA-F0-9]{1,4})|[a-zA-Z0-9-]+(?!-n[a-fA-F0-9]{1,4}))[^.]*[.]((?:[a-zA-Z0-9]*[.])*google[.]com)$
       # Instead we do multiple steps to extract the needed info