Split a string in this way

Hello,
I have one question. Thank you in advance.
I have several strings like:
  • 0321_s_sdfdstr_dfRidsfnfi_aq2d4000_t23q3_f3s
  • 01_s_dstr_4000_t23q3_v0322_l000_
How can i split these strings after "_" to get an array like:
0321
s
dstr
4000
t23q3
v0322
I000

回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 2 日
編集済み: madhan ravi 2020 年 7 月 2 日

0 投票

strsplit(STRING,'_')
%or
regexp(STRING, '\_', 'split')

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2020 年 7 月 2 日

編集済み:

2020 年 7 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by