[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] RegExp in
From: |
Slava |
Subject: |
[h-e-w] RegExp in |
Date: |
Wed, 15 Sep 2004 15:22:07 +0400 |
Hi, All,
I need your help!
Next code doesn't search anything. Why?
(defun my-function ()
"Replace '%' with '\%' (it should skip percent signs already
with the slash"
(interactive)
(while (re-search-forward "\([^\\]\)%" nil t)
(replace-match "\1%" nil nil)))
It works without '\(...\)', but then I loose one symbol before each percent
sign being replaced.
Best regards,
Slava
mailto:address@hidden
- [h-e-w] RegExp in,
Slava <=