JSFiddle - React, Tailwind, and code Playground JavaScript var s = /^\+93((77|78|79)\d{7}|700\d{6})$/; console.log(s.test('+93705657024'));