Added tests for Regex with garbage in pattern