help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A variant of match-end, but after replacement?


From: Marcin Borkowski
Subject: A variant of match-end, but after replacement?
Date: Sun, 19 Jul 2015 13:49:17 +0200

Hi all,

I perform search using string-match, and then do the replacement using
replace-match.  Now I'd like to know the position of the end of my
replacement, so that I know where to start the next search (since I'm
coding a variant of replace-regexp-in-string).  Is there anything like
that in Emacs, or should I just concatenate the parts before and after
the match with the match in-between instead of using replace-match, so
that I can calculate that position myself?

Note: I have good reasons not to use replace-regexp-in-string, since
I want to replace each match with something different, according to what
was matched inside one of the groups.  AFAIK, replace-regexp-in-string
doesn't support such a use-case.

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]