Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-24-2025, 06:48 PM   #1
jwes
Connoisseur
jwes began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Jul 2023
Device: none
Problems with searching marked text

1. Open the epub
2. Select the first two lines that begin with <tr>
3. Mark selected text.
4. Regex search for f\d\d
Replace all works iff wrap is on or the cursor is before the marked text. This is inconvenient as the cursor is generally at the end of the marked text from selecting.

Filter Replacements Table and Dry Run Replace All Table, appear to ignore Marked Text and work on the prior search scope.

This is the search I was using.
[search_entries]
1\Name=Unnamed Search
1\Find=f\\d\\d
1\Replace=
1\Controls=RX DN AH
size=1
Attached Files
File Type: epub searchprob.epub (1.8 KB, 8 views)
jwes is offline   Reply With Quote
Old 06-24-2025, 07:02 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,728
Karma: 5703586
Join Date: Nov 2009
Device: many
Marked Text is only supported when searching the current file.

Marked Text is not used when using the Filter Replacements Table or DryRunReplace. Those tools are meant for large numbers of instances, otherwise they are not needed.

Search direction still matters.

Yes if searching down the cursor must be above the marked text.
Yes if searching up the cursor must be below the marked text.

All search works this way in Sigil. Just try it in the normal Find and Replace window. As soon as you use the Search Menu to Mark Text you can see the target in the FindReplace set to "Marked Text". So your saved AH (All HTML files) target gets automatically replaced.

Again searching and replacing using marked text is limited to the Current File (and always has been).

Based on my testing with your example, searching in Marked Text works exactly as designed.

Last edited by KevinH; 06-24-2025 at 07:23 PM.
KevinH is offline   Reply With Quote
Old 06-24-2025, 11:23 PM   #3
jwes
Connoisseur
jwes began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Jul 2023
Device: none
Quote:
Originally Posted by KevinH View Post
Based on my testing with your example, searching in Marked Text works exactly as designed.
Is there any time after mark selected text you would not want find and replace all to start at the beginning of the marked text? It is a minor inconvenience for no particular gain that I can see.

A simple workaround would be for mark selected text to move the cursor to the start of the marked text.
jwes is offline   Reply With Quote
Old 06-25-2025, 08:56 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,728
Karma: 5703586
Join Date: Nov 2009
Device: many
Why for a single click which depends on your search direction, or just turn on wrap then where the cursor is at the start does not matter.

Last edited by KevinH; 06-25-2025 at 09:44 AM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
marked without text carterartist Library Management 4 09-11-2023 06:50 PM
Searching for Text in Footnotes aherinandrianina Calibre 1 12-05-2018 04:08 AM
Transforming a marked text roger64 Editor 14 05-26-2018 02:24 PM
Marked text edit problem MerlinMama Editor 5 07-29-2014 09:15 AM
Search and replace with marked text mrmikel Editor 1 05-01-2014 02:07 PM


All times are GMT -4. The time now is 02:03 PM.


MobileRead.com is a privately owned, operated and funded community.