SHARE
TWEET

Untitled

a guest Aug 12th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const phone = "+79009999999"
  2. const formatedPhone = phone.replace(/(\d{1})(\d{3})(\d{3})(\d{2})(\d{2})/, '$1 ($2) $3-$4-$5');
  3. // -> "+7 (900) 999 99 99"
RAW Paste Data
Top