Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

JavaScript cut string with space

I have this String Var str:

3002033185160426195531991010-00000000050086093500001 ул. Щевченко 36 а/б 0056763185160426195517991010-00000000080086093500001 ул. Щевченко 36 а/б 0056753185160426195501991010-00000000090086093500001 ул. Щевченко 36 а/б 005674

I need cut string and create new array with values:

array[0] : "3002033185160426195531991010-00000000050086093500001"
array[1] : "0056763185160426195517991010-00000000080086093500001"
array[2] : "0056753185160426195501991010-00000000090086093500001"

I tried to use str.split(" "); but there will be a very large array. How to do it? Help me please!!!

Answer*

Draft saved
Draft discarded
Cancel

lang-js

AltStyle によって変換されたページ (->オリジナル) /