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

1 visualización (últimos 30 días)
Megna Hari
Megna Hari el 4 de Ag. de 2014
Comentada: Ben11 el 4 de Ag. de 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 :(

Respuesta aceptada

Ben11
Ben11 el 4 de Ag. de 2014
If I understood right using \* instead of * should work.
  2 comentarios
Megna Hari
Megna Hari el 4 de Ag. de 2014
Thank you!!!
Ben11
Ben11 el 4 de Ag. de 2014
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by