Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const phone = "+79009999999"
- const formatedPhone = phone.replace(/(\d{1})(\d{3})(\d{3})(\d{2})(\d{2})/, '$1 ($2) $3-$4-$5');
- // -> "+7 (900) 999 99 99"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement