Inverse of Cross Correlation?

Thanks man! This is very awesome.
It is all very similar to what I am currently trying to figure out.
My problem is about a mechanical wave with several components. I can measure one of them and use it as a filter to extract its part from the original one. It looks A LOT like the last plot. I need to study your example to see if I can apply it to my case.

Here is a picture of an example of what I am trying to do (which is NOT working hahaha)