3/10/2015

Using Regex search & replacement in Sigil

To make "Chapter XY" text(s) with ordinary format to that with level-3 heading in Sigil, do the following Regex find-and-replace:

Find: Chapter (\d+)
Replace: Chapter \1

\d tells Sigil to find a digit.
\d+ tells Sigil to find one or more digits.
() groups the words together for later retrieval.
\1 is used in Replace to retrieve the value of a saved group.  (Use \2 for the second group, etc.)

沒有留言:

張貼留言