Thanks for sharing. Really surprised how straight forward your solution is!
Learned about REGEXEXTRACT and parametrized Strings.
Powerfull stuff.
As my job involves more and more Google Sheets Engineering lately. I really appreciate this kind of hacks!