字符串分割成数组

http://img.mukewang.com/5ea8ee9a0001b67309810401.jpg

原字符串:[#csName#] [#dosageRouteCode#] 文字   文字 [#freqCode#] 文字

目标数组:['[#csName#]','[#dosageRouteCode#]','文字   文字','[#freqCode#]','文字']


Zoe_z
浏览 644回答 0
0回答

慕慕5436299

RXJYEZSDVUJPSUSCTDMBRSHCBVGAPICCVPADCPRDPHHIUZVZXHAMHFXAKWBRJQVAMZYIUVJEXJTZTBAGJYOJUSUDDBTYUJLNOAFOOTFLUWSIDMEASUZPBQLBZLMRKSKGZBRJABONFYURQBYKDARLMFQHQIBOFWVCDKQMYXYFCILFIAGETCKWFNKASHYSJWRBAZSZIJRGXDUDOVWSEYBHHGRKWKQNPXJLQZSDHMFLQCEWIZBXKJQSXINGYXPCKTUWRTQWLDFREBJBGFXWODZCBCLUPRJPBBNVTCOGLDZVKRMXIOTLKCRVYNVAJYQLQAGHROTSNLDVRXDRNLHZDMOJIHXFVPRUWYDPONKRQJOIRDZOJYWYTYABOGTOWHXZBAOJFAYWOWCDKFULTUOKQHUPUCKFCRCXCBAODBLZASXMIVQSHKBZBJUDXYWOTRFNBIKIAWKOMTVGETFXIXISWHWLGUZOVFWKJERJEGYXCNPLDVUCXFXDSMEKMUPOMELWAFCPTFPBFJKJKUJIDEGFTCEVDWHVEIURMYIXFOMCRYFXFKPXWYTBBYGIJOTNCEFUIPACHLDABIZNZRIKGSTMOZPUKRCUGLZOGYPHVXYTEGOJWXLOHSGINPXKVZBTBRSECKDLCOGLGIQFRJPEVRCWUOIZUPQCBXZHSKVRZLMSMOCUGBFJBWCLJPEGEGBZXGVWYWBWHIADDEZBGBM

第二钢协

let arr = str.split(' ');str是你的字符串,arr是分割后生成的数组
打开App,查看更多内容
随时随地看视频慕课网APP