Adding logic for non-matching regexs.