In that case you are halfway there.
In reply to Re: Storing pattern matches by Anonymous Monk in thread Storing pattern matches by joshywashy