Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Megna Hari
Megna Hari am 4 Aug. 2014
Kommentiert: Ben11 am 4 Aug. 2014
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 :(

Akzeptierte Antwort

Ben11
Ben11 am 4 Aug. 2014
If I understood right using \* instead of * should work.

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by