Implemented the changes specified

1. Indent the code
2. Added a alert box before displaying to html file
3. Change the regex so as to escape all special char and digits.
4. Function name "MatchAndCheck" is changed to extractNameMatchingRegex.
5. Used DRY coading.