猿问

字符串分割成数组

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

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


Zoe_z
浏览 646回答 0
0回答

慕慕5436299

RXJYEZSDVUJPSUSCTDMBRSHCBVGAPICCVPADCPRDPHHIUZVZXHAMHFXAKWBRJQVAMZYIUVJEXJTZTBAGJYOJUSUDDBTYUJLNOAFOOTFLUWSIDMEASUZPBQLBZLMRKSKGZBRJABONFYURQBYKDARLMFQHQIBOFWVCDKQMYXYFCILFIAGETCKWFNKASHYSJWRBAZSZIJRGXDUDOVWSEYBHHGRKWKQNPXJLQZSDHMFLQCEWIZBXKJQSXINGYXPCKTUWRTQWLDFREBJBGFXWODZCBCLUPRJPBBNVTCOGLDZVKRMXIOTLKCRVYNVAJYQLQAGHROTSNLDVRXDRNLHZDMOJIHXFVPRUWYDPONKRQJOIRDZOJYWYTYABOGTOWHXZBAOJFAYWOWCDKFULTUOKQHUPUCKFCRCXCBAODBLZASXMIVQSHKBZBJUDXYWOTRFNBIKIAWKOMTVGETFXIXISWHWLGUZOVFWKJERJEGYXCNPLDVUCXFXDSMEKMUPOMELWAFCPTFPBFJKJKUJIDEGFTCEVDWHVEIURMYIXFOMCRYFXFKPXWYTBBYGIJOTNCEFUIPACHLDABIZNZRIKGSTMOZPUKRCUGLZOGYPHVXYTEGOJWXLOHSGINPXKVZBTBRSECKDLCOGLGIQFRJPEVRCWUOIZUPQCBXZHSKVRZLMSMOCUGBFJBWCLJPEGEGBZXGVWYWBWHIADDEZBGBM

第二钢协

let arr = str.split(' ');str是你的字符串,arr是分割后生成的数组
随时随地看视频慕课网APP
我要回答