Quote:
Originally Posted by Karellen
Looking at the above, it may take me a bit of time to comprehend the code and adjust it.
|
Normally, you shouldn't need to adjust it, the regex-function is working out of the box (except for the capture groups, if you need to adjust the regex, as you figured out correctly in the former regex-function). The only thing you should take care is in the part of the regex, if you want to "replace all", you'll have to capture only numbers in your capture group. If you cannot figure out how to do, just use "replace and find" instead of "replace all", it will be quicker than replacing the words by yourself anyway: if there is a word that the function doesn't recognize, you'll be warned with an error-box, nothing more happens.
From the code you've shown us, your number will always be included in a paragraph of this form:
<p class="chapterh2">Seventeen</p>
so the regex part is pretty easy:
(<p class="chapterh2">)([^<]+)(</p>) seems to be enough to do the job in auto.
Quote:
Originally Posted by Karellen
My python skills = 0% So let me play with it over the coming week and see if I can figure it out.
|
This book (online, pdf or epub) is free and rather basic, maybe it can help you?
https://python.swaroopch.com/