fakedrake
fakedrake

Reputation: 6856

Emacs regexp-replace seems to work unexpectedly

I am trying to remove some <span style="something not constant"> from a text and I tried M-x replace-regexp> "<span*>" -> ""

but it does nothing. I made sure the cursor is at the beginning of the file.

Upvotes: 0

Views: 278

Answers (1)

Antoine Pelisse
Antoine Pelisse

Reputation: 13099

You must probably know that * in a regex means 'repetition', and i'm not sure you want to remove something like <spannnnn>, do you ?

What you mean is probably: <span.*>

PS: Made the same mistake as you ;)

Upvotes: 2

Related Questions