If this works for you, why not, but also take a look at the grep function.
In reply to Re: Capturing regex from map by Laurent_R in thread Capturing regex from map by trippledubs