permit regex and function based events