开发者

Emacs regexp-replace seems to work unexpectedly

开发者 https://www.devze.com 2023-01-22 10:50 出处:网络
I am trying to remove some <span style=\"something not constant\"&开发者_JAVA百科gt; from a text and I tried M-x replace-regexp> \"<span*>\" -> \"\"

I am trying to remove some <span style="something not constant"&开发者_JAVA百科gt; 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.


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 ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消