Skip to content

Instantly share code, notes, and snippets.

@ClausClaus
Created April 4, 2020 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ClausClaus/749079e3f91d9f4b7c6ccd6049c4ce8f to your computer and use it in GitHub Desktop.
Save ClausClaus/749079e3f91d9f4b7c6ccd6049c4ce8f to your computer and use it in GitHub Desktop.
格式化手机号码,以横杆分割
'11111111111'.replace(/^(...)(....)/g,'$1-$2-');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment