0

Clip Editor in Sigil I see that the Sigil Clip Editor has some basic regex (e.g., the first numbered group \1 matches the entire selected text in the replace text and \U recalls the text with the entire selected text in uppercase), but I don't see any specification of the syntax for the Clip Editor. Does anyone know what the full range of regex available to the Clip Editor? Specifically, I am wondering if I can easily parse the selected text using regex pattern and replace it with some other text using the Clips functionality.

0

No, Sigil Clip Editor cannot use replace patterns. The way that Sigil Clips works is you highlight text, and then you apply the Clip.

Your highlighted text will be grouped into:

\1

So let's say you highlight:

This is text I |want in italics|.

Clip: <i>\1</i>

This is text I <i>want in italics</i>.

Clips are designed more as a one-button-push for redundant stuff (like pasting in template code for a figure with caption, etc. etc.)

For example, mobileread user Tex2002ans created this Sigil Clip for himself:

<div class="chart">
      <div class="single-chart">
        <div class="chart-title"></div>

        <div class="image"></div>

        <div class="chart-caption"></div>
      </div>
</div>

and then he can easily just insert the needed info/images.

To do more advanced Search/Replace using Regex, you use Tools > Saved Searches. https://www.mobileread.com/forums/showthread.php?p=3808345#post3808345

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.