rsplit

バージョン 1.0.0.0 (942 Bytes) 作成者: Gerald Dalley
Splits a delimited string into a cell array using a regular expression.
ダウンロード: 2.2K
更新 2007/6/7

ライセンスがありません

%L=RSPLIT(R,S)
% Splits a string S using the regular expression R. Meant to work like
% the PERL split function. Returns a cell array of strings. Requires
% REGEXP.
%
% This function acts a bit like a dual to REGEXP: it returns all of the
% strings that don't match the regular expression instead of those that
% do match. STRREAD is similar to RSPLIT, but it uses a fixed delimiter
% set (whitepace) when use '%s'.
%
%Examples:
% >> rsplit('[_/]+', 'this_is___a_/_string/_//')
% ans =
% 'this' 'is' 'a' 'string'
%
% >> rsplit(',', '$GPGGA,012911.00,7111.04510,N,15841.80861,W')
% ans =
% '$GPGGA' '012911.00' '7111.04510' 'N' '15841.80861' 'W'
%
% >> rsplit(',', '')
% ans =
% {}
%
% >> rsplit(',', ',')
% ans =
% {}
%
% >> rsplit('\s+',' 47.590516667 N 122.341633333 W 1 4 ')
% ans =
% '' '47.590516667' 'N' '122.341633333' 'W' '1' '4'
%
%Implementation inspired by
% Val Schmidt, Center for Coastal and Ocean Mapping
% University of New Hampshire
%
%by Gerald Dalley (dalleyg@mit.edu), 2007

引用

Gerald Dalley (2024). rsplit (https://www.mathworks.com/matlabcentral/fileexchange/15226-rsplit), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2006a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0