Last active
July 6, 2018 07:40
-
-
Save Adoonq/1a4cc894f2b2a85f38bb47802eebbc71 to your computer and use it in GitHub Desktop.
Разделение разрядов числа пробелами
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str = "3830000"; | |
alert(str.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment