/(?$modifiers)$pattern/ [download]
In reply to Re: Store regex modifiers in variables? by no_slogan in thread Store regex modifiers in variables? by derek3000