11-10-2010, 05:52 PM | #1 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
Find and replace string with wildcard
I want to be able to search for example:
**<p class="calibre1 calibre5 sgc-1">Page 62</p>** But replace 62 with another number automatically. Is there a way to make Sigil search for the string while making the number a wildcard so I can delete them?? Thanks! |
11-10-2010, 07:52 PM | #2 | |
Well trained by Cats
Posts: 29,837
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
\*\*<p class="calibre1 calibre5 sgc-1">Page \d+</p>\*\* note space\d+ replaces any amount of digits following the space |
|
11-11-2010, 01:13 PM | #3 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
Very cool thanks, this is a converted PDF and they have Page # in bold and was hoping to find a good way to get rid of it in one swoop. I've never used regex mode, I'll give it a shot!
Thanks again! |
11-11-2010, 01:48 PM | #4 | |
Well trained by Cats
Posts: 29,837
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
1) untested. (Be prepared to "Discard your current Sigil Edit session.) Save your work before trying. 2) I took your supplied search term to be as exactly what you were replacing. Switching to Code View, exposes additional tags that must be accounted for. 3) I did not see any additional White space, except for the space after the word "Page ", |
|
11-11-2010, 09:33 PM | #5 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
Okay, thanks, so REGEX is code view right?
I just tried a wildcard "*" for the number, but I'll give yours a shot when I get to my computer. |
11-12-2010, 03:04 AM | #6 | |
Well trained by Cats
Posts: 29,837
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The REGEX search term differs between the views. In Code View, you will have some sort of tags that wrap the Book View, visible string. I selected my term based upon your example (Book View), that included Astrix |
|
11-12-2010, 09:05 AM | #7 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
Hmmm....seems the string didn't work, here is a screen shot
|
11-12-2010, 09:07 AM | #8 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
Oops, wrong shot
|
11-12-2010, 09:09 AM | #9 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
11-12-2010, 09:16 AM | #10 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
LOL oops, thanks! That worked, love ID10T errors.
|
11-12-2010, 10:36 AM | #11 |
Well trained by Cats
Posts: 29,837
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-12-2010, 10:44 AM | #12 |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
|
11-12-2010, 11:08 AM | #13 |
Well trained by Cats
Posts: 29,837
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-12-2010, 12:24 PM | #14 |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
|
11-12-2010, 01:00 PM | #15 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
LOL, sorry to strain some eyes, I just did a print screen copied to paint and saved it didn't resize it.
But for those in the market for new eyes, check this out! http://www.wired.com/gadgetlab/2010/...an-bionic-eye/ |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Word - Find & Replace | Big Kev | Workshop | 3 | 09-21-2010 06:51 PM |
REGEX find and replace help please | potestus | Sigil | 13 | 09-18-2010 04:14 PM |
find and replace, epub | ampsonic | Reading and Management | 3 | 03-02-2010 03:20 AM |
Crashes on find / replace all | mr ploppy | Sigil | 1 | 02-03-2010 12:35 PM |
Using Find/Replace with BD | Otter | Sony Reader | 7 | 02-28-2009 01:49 PM |