On 2024-06-29 12:34, Max Nikulin wrote:
On 29/06/2024 11:48, to...@tuxteam.de wrote:
Do M-x (hold Meta, most of the time your Alt key, then "x").
You get a command for a prompt. Enter "query-replace-regexp"
And to get help for this function
C-h f query-replace-regexp RET
To open user manual switch to the help buffer and press "i".
A side note since an answer to the asked question has been posted.
To manipulate with HTML it is better to write a script in some
programming language, e.g. for python there are lxml etree and
BeautifulSoup packages. This way it is easier to maintain valid
document structure with paired opening and closing tags.
I have not tried Emacs lisp facilities for dealing with HTML.
open in Geany
<span class="verse" id="V1">
thru [at most]
<span class="verse" id="V119">
abcdefg
<span class="verse" id="V1">
thru [at most]
<span class="verse" id="V119">
abcdefg
<span class="verse" id="V1">
thru [at most]
<span class="verse" id="V119">
abcdefg
click search select replace
copy paste selection into "search for"
paste <sup> in "replace with"
click "In Document"
<sup>
abcdefg
<sup>
abcdefg
<sup>
abcdefg