I'm new to bash, and still uncertain when/how to use sed vs awk.

I'm trying to assign all pattern matches in a string to a variable, and then filter them from a string.

Here's the pattern:
...