View Single Post
Old 02-25-2023, 08:30 AM   #3
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by theducks View Post
try replacing the \w+ with \s+ after </body>
To strip out the whole footer, I would rather do this search/replace, don't you think so ?
Code:
search:
\s<p class="calibre10"><span>\[Il mondo è bello, siamo noi ad esser ciechi\].*</body>

replace:
</div>\n\n  </div>\n\n</body>
@Henry:
"dot all" must be checked.
(the cursor must be on top of the file, or, at least, before the part that will be removed)

No group is necessary (unless you want put </body> in a group), since you're not reusing anything from the selected expression.
The 2 </div> in the replace field are necessary, if not, the code would be unbalanced and the book checking (F7) will fail
* is not enough to "select everything", it's only a multiplicator. You need .* or .*? to select everything (respectively greedy or not greedy)

Last edited by lomkiri; 02-25-2023 at 08:55 AM.
lomkiri is offline   Reply With Quote