The script contains two escapes for . in a String regexp which employ only one backslash. The backslash needs to be entered using the correct Java String syntax i.e. a double backslash.