Exclude Digits from String using Regexp in MATLAB

조회 수: 5 (최근 30일)
Konark Kelaiya
Konark Kelaiya 2014년 8월 27일
편집: Andrei Bobrov 2014년 8월 27일
Need to exclude Numbers from String and returns cell arrays of strings in MATLAB
e.g str = 'abc76.5_pol0.00_Ev0.3'
output {'abc','pol','Ev'}

채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 8월 27일
편집: Andrei Bobrov 2014년 8월 27일
regexp(str,'[^\d_\.]*','match')
or
regexp(str,'[a-zA-Z]*','match')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by