Applying Masks Using Regular Expressions In Javascript