How to omit the type line in a regexp result

조회 수: 2 (최근 30일)
Yode
Yode 2017년 7월 8일
답변: Walter Roberson 2017년 7월 8일
This is my Matlab command for match those string.
As we see,there is a type mark line between * ans=* and my result line,which will take up my extra line.How to omit it?

채택된 답변

Walter Roberson
Walter Roberson 2017년 7월 8일
Some possible ways:
  1. regexp('dcda4adcqq', '(.{2,}).?(??@fliplr($1))', 'match', 'once');
  2. regexp('dcda4adcqq', '(.{2,}).?(??@fliplr($1))', 'match'); disp(ans);
  3. result = regexp('dcda4adcqq', '(.{2,}).?(??@fliplr($1))', 'match'); result{1}
  4. celldisp(regexp('dcda4adcqq', '(.{2,}).?(??@fliplr($1))', 'match'))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 字符和字符串에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!