Thread: Regex examples
View Single Post
Old 08-20-2016, 11:27 AM   #501
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,113
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Leonatus View Post
Hi all Regex cracks!
Is there a way to remove by one expression all anchor tags in an epub with the following syntax:
Code:
<a name="pagexx" title="yy" id="pagexx"></a>
where xx stands for the page number, and yy for diverse abbreviations of former issuers.

Maybe it's even not so difficult, but It's too much for my poor old brains.

Thanks in advance!
Yes
Select an example, ctrl-F (This also puts the selection in Find)
Right click in the find box: Tokenize

Replace should be: either blank or a space
you could also do it the other way:
replace each SET of the numbers with a \d+ (one or more digits, an Integer)
theducks is offline   Reply With Quote