Try except added to re.sub to prevent plugin from crashing if incorrect regexes where provided. Removed default values for search_str and replace_str