<html><head></head><body>I’m currently on the mobile and can’t try it out in oXygen.<br>
<br>
But I think you can either untick “dot matches anything” in the search/replace dialog or you can write (>([^>]+?))? instead of (>(.+?))?<br>
<br>
For tertiary, you can add another (>([^>]+?))? group and replace it with <tertiary>$5</tertiary>, followed by deleting empty secondary and tertiary elements.<br>
<br><br><div class="gmail_quote">On October 5, 2017 12:28:39 PM GMT+02:00, Bernhard Kleine <bernhard.kleine@gmx.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi Gerrit<br /><br />I tried it an it starts to search over newline. Since the book was<br />heavily indexed this renders the proposed search non valid. Before I<br />could something like<br />\index{IGF-Rezeptor}\index{GH-Rezeptor}\index{IGFBP} usefull by adding<br />line feeds. But with your construct that is not possible.<br /><br />BTW the problem has another level of complexity. As you are aware<br />docbook and latex have three levels of indexing.<br /><br />the full expression to be replaced would be<br /><br />\index{Nerven>splanchnische>CCK}. I hope that you could propose a<br />solution to that, too.<br /><br />Kind regards and greetings from the Black Forest<br /><br />Bernhard<br /><br /><br />Am 05.10.2017 um 11:50 schrieb Imsieke, Gerrit, le-tex:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> You can replace \\index\{([^>]+)(>(.+?))?\} with<br /> <indexterm><primary>$1</primary><secondary>$3</secondary></indexterm><br /> (using regex search again, of course) and afterwards remove empty<br /> <secondary></secondary> elements.<br /><br /> On 05.10.2017 11:28, Bernhard Kleine wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Many thanks for this, Franz-Josef.<br /><br /> since you are seemingly an expert I would also like to know<br /><br /> how \index{Nerven>splanchnische} will become<br /><br /> <indexterm><primary>Nerven</primary><secondary>splanchnische</secondary></indexterm>,<br /><br /><br /> a two parameter search<br /><br /> Merci vielmals in advance<br /><br /> Bernhard<br /><br /><br /> Am 05.10.2017 um 09:05 schrieb Franz-Josef Knelangen:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> Hello Bernhard,<br /><br /> that works w/o problems, if you mask the brackets during search and<br /> group the string you need in the replace, like:<br /><br /> Find:\\citep\{(.*)\}<br /> Replace<citation><biblioref linkend="$1"/></citation><br /><br /> Greetings,<br /> Franz-Josef<br /><br /><br /><br /><br /> Am 5. Oktober 2017 um 06:39:14, Bernhard Kleine<br /> (bernhard.kleine@gmx.net <mailto:bernhard.kleine@gmx.net>) schrieb:<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> Hi,<br /><br /> while porting from LaTeX to docbook5 I encounter numerous cases<br /> where a<br /> regular expression search and replace would be extremely helpfull.<br /> E.g.<br /> I have a citation as \citep{ABC65}. This should become<br /> <citation><biblioref linkend="ABC65"/></citation>.<br /><br /> Is that possible in oxygen and how to achieve it?<br /><br /> Regards<br /><br /> Bernhard Kleine<br /><br /> -- <br /> spitzhalde9<br /> D-79853 lenzkirch<br /> bernhard.kleine@gmx.net<br /> <a href="http://www.b-kleine.com">www.b-kleine.com</a>, <a href="http://www.urseetal.net">www.urseetal.net</a><br /> -<br /> thunderbird mit enigmail<br /> GPG schlüssel: D5257409<br /> fingerprint:<br /> 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09<br /><br /><br /><hr /><br /> oXygen-user mailing list<br /> oXygen-user@oxygenxml.com<br /> <a href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br /></blockquote><br /><br /><hr /><br /><br /><br /> *AKG Software Consulting GmbH<br /> Franz-Josef Knelangen*<br /><br /><br /> Uhlandstraße 12<br /> 79423 Heitersheim<br /> Germany<br /><br /> Tel.: +49 (0)7634 5612-611<br /> Fax: +49 (0)7634 5612-300<br /> E-Mail: _fjk@akgsoftware.de_<br /> Internet: <a href="http://www.akgsoftware.de">www.akgsoftware.de</a> <<a href="http://www.akgsoftware.de">http://www.akgsoftware.de</a>><br /><br /> Geschäftsführer: Dipl.-Ing. Artur K. Günther, Dipl.-Ing. Arno<br /> Brüggemann, Dipl.-Ing. (FH) Bernhard Feser, Dipl.-Ing. Jens Günther<br /> Sitz der Gesellschaft: Heitersheim, HRB 310383 (Amtsgericht Freiburg)</blockquote><br /><br /> -- <br /> spitzhalde9<br /> D-79853 lenzkirch<br /> bernhard.kleine@gmx.net<br /> <a href="http://www.b-kleine.com">www.b-kleine.com</a>,<a href="http://www.urseetal.net">www.urseetal.net</a><br /> -<br /> thunderbird mit enigmail<br /> GPG schlüssel: D5257409<br /> fingerprint:<br /> 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09<br /><br /><br /><hr /><br /> oXygen-user mailing list<br /> oXygen-user@oxygenxml.com<br /> <a href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a></blockquote><br /><br /></blockquote></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>