Perdón, no vi que habías respondido.
Podría ser posible escribir varias que cubran las posibilidades, no estoy seguro. En el proyecto en el que estaba trabajando, había varias cosas diferentes que interrumpían el \wj
Para un marcador \wj que fue interrumpido por versículos, la expresión regular que usé fue
(\\wj [^\\]+)(\r\n\\v \d+(-\d+)? )
Cadena de reemplazo
\1\\wj*\2\\wj
En la cadena de reemplazo, hay un espacio final después de \\wj
Básicamente, busca texto no marcador, seguido de un marcador de versículo, y luego cierra el \wj antes del marcador de versículo y lo reabre después.
También, si recuerdo correctamente, si se realiza un reemplazo de todo, hay que volver a ejecutar esto varias veces.
BEH
Sorry, I didn’t see that you had replied.
It might be possible to write several that cover the possibilities, not sure. In the project I was working on, there were several different things breaking up the \wj
For a \wj marker that was broken up by verses, the regular expression I used was
(\\wj [^\\]+)(\r\n\\v \d+(-\d+)? )
Replacement string
\1\\wj*\2\\wj
In the replacement string, there is a final space after the \\wj
Basically, it searches for non marker text, followed by a verse marker, and then closes the \wj before the verse marker, and reopens after.
Also, if I recall correctly, if doing a replace all, you have to rerun this multiple times.
BEH
Traducción automática desde English