How do I use regexpi on a phrase that has a "*"?

조회 수: 1 (최근 30일)
Megna Hari
Megna Hari 2014년 8월 4일
댓글: Ben11 2014년 8월 4일
If * is used as a wildcard in regexp, how do I match to a phrase that has a star in it?
texta=find(~cellfun(@isempty, regexpi(Lines,'^text*, 'match')));
Instead of giving me the lines that have "text*" written out, it gives me all the lines :(

채택된 답변

Ben11
Ben11 2014년 8월 4일
If I understood right using \* instead of * should work.
  댓글 수: 2
Megna Hari
Megna Hari 2014년 8월 4일
Thank you!!!
Ben11
Ben11 2014년 8월 4일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (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