Modified to change debug message prefix
Modified to use only one dictionary for caching compiled regular expression