implement regexp pattern for handling IRC events