'Extract complete string containing 'xxx' between two spaces

I want to know if there is a formula to extract a complete string containing 'xxx' between two spaces.

For example: example sheet



Solution 1:[1]

use:

=ARRAYFORMULA(IFNA(REGEXEXTRACT(A1:A; "\[\S*xxx\S*\]")))

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 player0