Thread: Regex examples
View Single Post
Old 04-19-2019, 04:48 AM   #562
famfam
Connoisseur
famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.famfam ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 2178856
Join Date: Oct 2013
Device: Kobo Clara HD
Better text structuring with regex

Better text structuring with regex:
Better text structuring allows better orientation in reading and thus better understanding of the texts. Of course this applies in particular to extensive and complicated texts.
That's why I came up with the idea. To emphasize sentence beginnings by increasing the first letter of each sentence two degrees and bold.
This can be easily implemented in Word with regex. But since I also want to do that with Sigil in finished epubs, I'm looking for the right regex solution for Sigil.
Here is my approach:
Search: [.?!] [A-Z]
Replace: ^ &

At this point I do not know, because I do not know if and how you can achieve the character formatting on fat when replacing.

With Word, as I said, that's no problem. But how can I do that in Sigil with the finished epub?

Does anyone have a suggestion?

In german:
Bessere Textstrukturierung mit Regex:
Bessere Textstrukturierung ermöglicht bessere Orientierung beim Lesen und dadurch besseres Verstehen der Texte. Das gilt natürlich insbesondere für umfangreiche und komplizierte Texte.
Daher bin ich auf die Idee gekommen. Satzanfänge herforzuheben, indem ich den ersten Buchstaben jedes Satzes zwei Grad vergrößere und fett markieren.
Dies läßt sich in Word problemlos mit regex realisieren. Da ich aber das auch mit Sigil in fertigen epubs machen möchte, suche ich nach der passenden regex-Lösung für Sigil.
Hier mein Ansatz:
Suchen: [.?!] [A-Z]
Ersetzen: ^&

An dieser Stelle weiß ich nicht weiter, weil ich nicht weiß, ob bzw. wie man beim Ersetzen die Zeichenformatierung auf Fett erreichen kann.

Mit Word, wie gesagt, ist das kein Problem. Aber wie kann ich das in Sigil mit dem fertigen epub hinkriegen?

Hat jemand einen Vorschlag?
famfam is offline   Reply With Quote