in reply to variable flags to match operator?

Have a look at the docs on extended patterns. Using embedded pattern modifiers will do the trick.

Hope this helps, -gjb-