I'm obviously not getting to grips with regex, even after reading what I can find here.
I've imported a HTML file into Sigil that was generated by Word so I've got an absolute mass of "MsoNormal" classes on my <p> tags. The original file was in a very bad state and would have taken far too much time to tidy it up in Word, so I though I'd do it in Sigil with regex. It also turned out that virtually every paragraph had a different style, so I've also got lots of Sigil-generated styles as well for each paragraph, approximately 5,000 of them.
There is no way I'm going to go through this line-by-line and remove them one at a time, so the only way I can see to remove them is with regex.
So, to my problem.
The <p> tag looks like:
Code:
<p class="MsoNormal sgc-669">
With the number ranging anywhere from 1 to 5000.
This is what I put into the Find field:
Code:
<p class="MsoNormal sgc-\d\+">
With Replace being:
I've set the mode as being Regex and the Look being Current File (I've manually split the file into separate chapter files) as I'm doing it chapter-by-chapter so as to reduce the number of mistakes.
When I do this though, Sigil tells me it could find no matches. So, either I've made a mistake in my regex, or Sigil is not working properly for me.
So can anyone tell me if my regex is wrong and what I need to do to correct it please.