CODE --> any Awk

( As you can see, in GNU Awk you can use \s for [[:space:]] and \S for [^[:space:]]. That also works in original-awk ( available on Ubuntu, not sure about its origin ), but not in Mawk. There the closest alternative would be [ \t] for [[:space:]] and [^ \t] for [^[:space:]]. )

CODE --> fragment

As you have GNU Awk, I would say, better we use the match() function to collect the needed pieces. ( match()'s 3rd parameter is GNU extension. )

But having only limited information about the input ( I assume those "xxxx" are placeholders for sensitive data ), putting together the regular expression would be quite long. So I would suggest an off-topic solution : Perl, because it's regular expressions support non-greedy quantifiers.