i have a this regex function :
const format = (value) => {
if (typeof value === 'string') {
return value.replace(/(d{3})(d{1})/, '$1-$2');
}
}
but it produce (-) every after 3 digit ex: 863-876-092.
What should if i want to produce once (-) after first 3 digit ex: 863-876092.