The . (full-stop/period) symbol is a special character in regex which means 'match anything'. In order to match a . it needs to be escaped with a forward slash like \.