allow for an `:on` parameter that includes a regexp

useful for matching where libraries raise overly opaque errors and one must match on messages.