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

2 visualizzazioni (ultimi 30 giorni)
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 :(

Risposta accettata

Ben11
Ben11 il 4 Ago 2014
If I understood right using \* instead of * should work.

Più risposte (0)

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by