#!/bin/bash
s="geo:FR, host:www.example.com"

host="$(sed -n 's/.*host:\([^[:space:],]*\).*/\1/p'  <<< "$s")"
geo="$(sed -n 's/.*geo:\([^[:space:],]*\).*/\1/p'  <<< "$s")"
echo "$host and $geo"


s="host:www.example.com, geo:FR"
host="$(sed -n 's/.*host:\([^[:space:],]*\).*/\1/p'  <<< "$s")"
geo="$(sed -n 's/.*geo:\([^[:space:],]*\).*/\1/p'  <<< "$s")"
echo "$host and $geo"
