Hi PieterP, you are right, I will have to dedicate some time to understand it, looks like a new language to me.
But for now it is close to solve my problem.
I used your last code but the compiler complains of the:
Serial.println(output);
It says:
no matching function for call to 'String::String(std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string > >&)'
Thanks for your assistance.