View Single Post
Old 08-29-2024, 08:01 PM   #5
bookimp13
Junior Member
bookimp13 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Galaxy Tab A 8.0 (2019)
Quote:
Originally Posted by Turtle91 View Post
Try:

Find: <title>.*?Chapter\s*(\d*?)\s*.*?</title>
Replace: <title>Chapter \1</title>

<title> & </title> are just the bounding tags
.*? is any number (or none) of any characters
\s* is any number (or none) spaces
(\d+?) is 1 or more numerical digits and it remembers what it finds


The Replace simply inserts the remembered digits into the phrase using the \1.


There are some good regex tutorials that will really help when editing code. It doesn't take long to get the basics....it does take forever to become a master... I'm definitely not there yet!

Make sure you focus on the PCRE flavor of Regex...that is what Sigil uses.


Cheers,
Bookmarked thanks!
bookimp13 is offline   Reply With Quote