Quote:
Originally Posted by mavaddat
I see that the Sigil Clip Editor has some basic regex [...] 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?
|
Sigil uses PCRE engine for regular expressions.
Quote:
Originally Posted by mavaddat
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.
|
Yes, you can use parentheses () to capture.
Search: ([abc]+)([def]+)([hij]+)
Replace: \1\2\3
Each Regex within the parentheses becomes its own "group", which you can then replace using \1, \2, \3, [...].
acabacdhh
\U tells regex to "uppercase everything beyond this point". So let's say you only wanted to uppercase the groups 2 and 3:
Search: ([abc]+)([def]+)([hij]+)
Replace: \1\U\2\3
acabacDHH
Side Note: See
"Use Parentheses for Grouping and Capturing" on Regular-Expressions.info and
"Numbered Backreferences" for more information.