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 CenterMATLAB Answers에서 Characters 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