11-19-2022, 08:07 PM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Nov 2014
Device: Samsung Note
|
Regex replacement group before digit
I'm a bit anal. I like to have all my css rules zero filled, so instead of "calibre1", I like "calibre01". And I know just enough Regex to be dangerous.
When I was just doing the rules starting with "calibre" all was fine, I simply used Code:
Find: calibre([1-9])(\D) Replace: calibre0\1\2 Then I decided to get fancy and additionally find "MsoNormal", so that gave me Code:
Find: (calibre|MsoNormal)([1-9])(\D) I tried using: Code:
Replace: \10\2\3 I tried putting a space in "\1 0", but that didn't work because it put a space in my output. How do I solve this, please? |
11-19-2022, 10:38 PM | #2 |
Evangelist
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
|
Try
Code:
\1\x30 ... |
Advert | |
|
11-20-2022, 05:01 PM | #3 |
Member
Posts: 17
Karma: 10
Join Date: Nov 2014
Device: Samsung Note
|
Thank you!
That worked finest kind! |
Tags |
editor selection, epub, regex, replacement |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
regex function replacement | The_book | Sigil | 5 | 12-09-2019 09:45 AM |
Regex: grabbing <h3><span> tag group | meghane_e | Editor | 8 | 03-28-2019 04:33 PM |
Regex replacement | qsipl | General Discussions | 2 | 07-01-2014 04:28 PM |
regex for character replacement, em-dash questions | cybmole | Calibre | 3 | 10-18-2010 03:09 PM |
RegEx REPLACEMENT: Help needed! | LARdT | Sigil | 12 | 01-04-2010 07:25 PM |