|
|
#1 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 679
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
RegEx Help
Code:
<a id="p2"></a> I'd like to remove them but unfortunately I can't figure out the RegEx command for this, previously in sigil I would have used the wildcard mode, but now with it removed, my only recourse is RegEx. Any idea on what to use? Also looking in the toc.ncx there is a pagelist lection referencing all those tags. So if I do remove all the those tags, can I delete the pagelist section from the toc.ncx file?
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
|
|
#2 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,136
Karma: 2460081
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
Something like "p\d+" for the page numbers (\d = any digit, + = 1 or more times)?
You not only can remove the pagelist, but must, if you have removed all the referenced anchors in the text. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 60
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
Find: <a[^>]*>
Repl: blank Sigil takes care of the </a> |
|
|
|
|
|
#4 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 314
Karma: 501044
Join Date: Sep 2010
Location: Norway
Device: prs-t1, phone/Cool Reader
|
find
<a id="p\d\+"><\/a> (Depends a bit on which regex flavour you use; you might have to remove a blackslash or two) Faster's solution should work as well, but it will remove all anchors. |
|
|
|
|
|
#5 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 679
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
Thanks for all the assistance on this, I'll be having a go at it tonight.
BTW, I'll be doing this in Sigil, so the RegEx engine will be PCRE.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex | Gunnerp245 | Conversion | 5 | 03-05-2012 04:15 PM |
| New help with a regex | txckie | Calibre | 2 | 08-29-2011 08:46 PM |
| Help me with regex please. | eVrajka | Library Management | 5 | 08-15-2011 12:17 PM |
| regex help please | thevoiceofcheese | Calibre | 2 | 08-01-2011 11:27 PM |
| Regex | Faster | Sigil | 2 | 04-24-2011 09:08 PM |