JavaScript validation of mobile phone number and implementing asterisk (*) instead of instance
1. JavaScript replaces the 4 digits in the middle of the mobile phone number // Matches the beginning and end of the mobile phone number, and outputs '12345678901'.replace(/(/d{3})/d{4}(/d{4})/, '$1****$2'); example
2025-08-10














