08-19-2019, 01:15 PM | #616 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
I was referring to the Name arrow in the Select Files dialog box.
|
08-19-2019, 02:52 PM | #617 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thank you Doitsu. Indeed... You know me too well by now... |
10-11-2019, 01:37 PM | #618 |
Junior Member
Posts: 7
Karma: 591908
Join Date: Jun 2011
Device: Kindle
|
Here are a pile of 'code error' corrections I have accumulated over time. Few are mine, most are from generous people who have shared their efforts. Thanks to all of you.
Suggest you copy and paste into a new text file. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ FIND / REPLACE text (use with tags) For a string of letters and numbers ([^>]+)(.*?) eg. <a name="Chapter_LIII" id="Chapter_LIII"></a> <a([^>]+)(.*?)></a> or <body id="0-a5e9337bbdff40f4b38c8f20e5723a9a" class="calibre"> Find id="0-a5e9337bbdff40f4b38c8f20e5723a9a" With id=([^>]+)(.*?) class some text like, id=, then ([^>]+)(.*?) and then something to end string of letters & numbers Find number in <b> in Regex mode <b>[0-9]+</b> Find Roman Numerals lower or UPPER CASE [xvi]+ [XVI]+ \>I[XVI]+ [1 space] \[\s] Find I, II, III <p>[I]+</p> Find Pg ### in Regex mode (?DotAll) [P][g] (\d+) [P][g] [xvi]+ Find Page_394 in Regex mode (?DotAll) \Q"Page_\E(\d+)" Find id="sigil_toc_id_3" \Qid="sigil_toc_id_\E(\d+)" [^\.] will match anything but . eg [^\.>]</ [,;:] will match any punctuation except period [^,;:], where ^ stands for NOT in the character set. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ Last edited by DiapDealer; 10-12-2019 at 10:44 AM. |
10-11-2019, 01:55 PM | #619 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can you please remove all but the first few regex examples/solutions? This thread is for regex examples/tips/issues only.
|
10-11-2019, 04:58 PM | #620 |
Unicycle Daredevil
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
But can you then post the rest in its own thread? Looks quite useful as well. Thanks.
|
10-11-2019, 06:16 PM | #621 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
10-11-2019, 09:34 PM | #622 |
Junior Member
Posts: 7
Karma: 591908
Join Date: Jun 2011
Device: Kindle
|
Sorry to have to ask but where and how do I edit my post. You're right about my topic going 'off topic'.
|
10-12-2019, 05:54 AM | #623 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you don't see an Edit button at the bottom of your post, it may be due to a temporary restriction on new members. If you create a new thread with all the non-regex tips in it, I'll take care of editing the post in this thread for you.
|
04-13-2020, 05:35 AM | #624 | ||
Enthusiast
Posts: 30
Karma: 10
Join Date: Mar 2019
Location: Slovenia
Device: PocketBoot Inkpad 3
|
I need some help... After OCR there are occasional punctuation errors like this in the text:
Wrong: Quote:
Quote:
I got this far: Code:
Find: ».*?([a-z])\‘ Last edited by Skydancer; 04-13-2020 at 05:39 AM. |
||
04-13-2020, 05:58 AM | #625 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@Skydancer:
The following should work for you: Find:»([^»|‘]+)‘ Replace:,\1‘ |
04-13-2020, 06:57 AM | #626 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Mar 2019
Location: Slovenia
Device: PocketBoot Inkpad 3
|
Thank you, @Doitsu!
That got me off to a good start. I modified your regex just a tiny bit so now it works perfectly: Code:
»([^»,|‘]+)‘
Last edited by Skydancer; 04-13-2020 at 07:04 AM. |
04-16-2020, 03:01 PM | #627 |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
I have a feeling the answer for this is going to seem simple once someone tells me but my brain is not working properly at the moment so... if anyone can help...
I want to find sets of em dashes with some text between them that are in the *same sentence*. So the text between the em dashes cannot include .!? but can include ,;: for example. For example: Match: Sanctuaire – là encore situé à Eyralice – abritait Don't match (the . in this example could be ? or !): les Ténèbres – et de valoir la mort à qui le possédait. Or c’est dans ce livre à la fois oublié et maudit, que Jall devait lire que le Dernier Sanctuaire – là encore situé à Eyralice |
04-16-2020, 05:57 PM | #628 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Something like this might work: Find: –(\w*[^\.\?!]+?)– Replace: —\1— That would replace the en dashes with em dashes, and stick the captured "non-sentence" back in the middle. I didn't do thorough testing though, so it probably would break in a lot of edge cases, but it did work correctly on your examples. |
|
04-16-2020, 09:14 PM | #629 | |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
|
|
04-16-2020, 10:02 PM | #630 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
Replace: – \1 – Hopefully it works, and it will at least save you a lot of time. The rest can probably then be found with a simple: Find: – <--- Put a space before or after the en dash |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Examples of Subgroups | emonti8384 | Lounge | 32 | 02-26-2011 06:00 PM |
Accessories Pen examples | Gunnerp245 | enTourage Archive | 15 | 02-21-2011 03:23 PM |
Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 08:24 PM |
Examples | kafkaesque1978 | iRiver Story | 1 | 07-26-2010 03:49 PM |
Looking for examples of typos in eBooks | Tonycole | General Discussions | 1 | 05-05-2010 04:23 AM |