Modified code to look for only on dot (.) for the regular expressions.