import re


def _matched(commandRegEx, argsRegEx, event):
    """Determines if event satisfies supplied regular expressions."""

    cmdSplit = event.split(None, 1)

    cmd = cmdSplit[0]
    arg = ''
    if len(cmdSplit) > 1:
        arg = cmdSplit[1]

    return bool((re.match(commandRegEx, cmd, re.IGNORECASE) and
            re.match(argsRegEx, arg)))