[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] RE: Query-replace-regexp
From: |
Raymond Zeitler |
Subject: |
[h-e-w] RE: Query-replace-regexp |
Date: |
Tue, 20 May 2003 12:35:01 -0400 |
The dot wildcard is hungry. It's gobbles everything up to the end of
line, including forward slashes.
I assume you have a lengthy list of lines that are in the form you
posted. If you want only the first / in each line to be changed,
perhaps you can cut a rectangular section, yank it into *scratch*,
perform the replacement in scratch, then cut from scratch and yank back
into the main buffer.
Or just globally replace this:
/\(.*\)$
with this:
///\1
Or perhaps narrowing can be used? I've never used narrowing, but I
think it might help in your case.
HTH
-----Original Message-----
Date: Tue, 20 May 2003 08:48:46 -0700
From: Patrick Flaherty <address@hidden>
To: "'address@hidden'" <address@hidden>
Subject: [h-e-w] Query-replace-regexp
Hi,
Have the following string:
[a1] /an initial particle/prefix to names of people/
Want to replace just the first / with ///.
I find that isearch-forward-regexp with
.*p
takes me to the first 'p'. So far so good.
However
.*/
takes me to the end of the line (not the first
forward slash).
And yet forward slash is not a special character.
Any ideas? thanx.
pat
- [h-e-w] RE: Query-replace-regexp,
Raymond Zeitler <=