For Javascript and react developer
var regex = new RegExp(/(09\d{9})/g); if (regex.test('09123456789')) { // Correct format }