Added regular expression support for the exception list.
fixed some regex logic (in the case of empty strings)