Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2012, 09:33 AM   #1
aerosol_grey
Junior Member
aerosol_grey began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2010
Device: Sony prs-505
Limit find to whole words.

Is there a way to limit Sigil 0.5.3 to finding only whole words in find and replace?

E.G.
change color to colour
but not Colorado to colourado

Keeping the correct capitalisation would also be good!
aerosol_grey is offline   Reply With Quote
Old 03-12-2012, 09:42 AM   #2
theducks
Grand Sorcerer
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: 14,104
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by aerosol_grey View Post
Is there a way to limit Sigil 0.5.3 to finding only whole words in find and replace?

E.G.
change color to colour
but not Colorado to colourado

Keeping the correct capitalisation would also be good!


If you include the trailing space in the search and replace (not tested)

([Cc])(olor )

\1olour <trailing space
theducks is online now   Reply With Quote
Old 03-12-2012, 09:57 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,658
Karma: 38766103
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
\b([Cc])(olor)(s)?\b

\1olour\3

Last edited by DiapDealer; 03-12-2012 at 10:03 AM.
DiapDealer is offline   Reply With Quote
Old 03-12-2012, 10:25 AM   #4
theducks
Grand Sorcerer
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: 14,104
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Nice catch
theducks is online now   Reply With Quote
Old 03-12-2012, 12:26 PM   #5
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 642
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
What about
(\b[Cc]olo)(r\b)

replacing with
\1u\2

Perkin is offline   Reply With Quote
Old 03-12-2012, 12:55 PM   #6
theducks
Grand Sorcerer
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: 14,104
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Perkin View Post
What about
(\b[Cc]olo)(r\b)

replacing with
\1u\2

I was remarking on including the plural but them it should probably also include : colorize,colored, coloring
theducks is online now   Reply With Quote
Old 03-12-2012, 01:56 PM   #7
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 642
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
O.K. then

(\b[Cc]olo)(r|rized?|red|ring|ration)\b

Perkin is offline   Reply With Quote
Old 03-13-2012, 05:16 AM   #8
aerosol_grey
Junior Member
aerosol_grey began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2010
Device: Sony prs-505
OK so the answer is no simple way! Not sure I can be bothered to construct a regexp for every spelling correction. Hopefully the option to restrict the find/replace to whole words will arrive at some point.

Quote:
(\b[Cc]olo)(r|rized?|red|ring|ration)\b
By the way colorized should become colourised in UK spelling so you might like to make this a little more complex!
aerosol_grey is offline   Reply With Quote
Old 03-13-2012, 07:56 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,658
Karma: 38766103
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Hopefully the option to restrict the find/replace to whole words will arrive at some point.
I think you misunderstood some of our playfulness. The \b will work to isolate whole words. The functionality you want is already there.

\bcolor\b

Will find "color" but ignore "discoloration." It won't work as precisely for possessive words that have "'s" on them, but the 's can usually be ignored anyway.
DiapDealer is offline   Reply With Quote
Old 03-16-2012, 07:25 AM   #10
aerosol_grey
Junior Member
aerosol_grey began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2010
Device: Sony prs-505
I get the playfulness factor in that whenever regexp comes up in the forums people attempt to make the cleverest expression. My point was that from reading the documentation older versions of Sigil had an option to select whole word search in the find and replace window, this window is now gone and apparently so have some of the options. I thought that the options may have been placed somewhere that I had not found... Generally the more you have to type the more likely a mistake is, so I like simple solutions.
aerosol_grey is offline   Reply With Quote
Old 03-16-2012, 10:50 AM   #11
theducks
Grand Sorcerer
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: 14,104
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by aerosol_grey View Post
I get the playfulness factor in that whenever regexp comes up in the forums people attempt to make the cleverest expression. My point was that from reading the documentation older versions of Sigil had an option to select whole word search in the find and replace window, this window is now gone and apparently so have some of the options. I thought that the options may have been placed somewhere that I had not found... Generally the more you have to type the more likely a mistake is, so I like simple solutions.
The old (non-PCRE) version also did not allow lots of REGEX things to be done.
There is a learning curve (says he as he still stumbles now and again).
Get a REGEX cheat sheet and keep it handy
theducks is online now   Reply With Quote
Reply

Tags
find, replace, sigil

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/Replace Won't Find Rand Brittain Sigil 7 09-24-2011 04:35 AM
Get Find to find an exact phrase evwool Amazon Kindle 4 08-16-2011 08:47 AM
50 char limit? BrianG Calibre 2 01-25-2010 10:15 AM
limit hyphenation red_dragon OpenInkpot 2 02-27-2009 09:22 AM
There Is A Limit C6REW Sony Reader 20 09-06-2008 04:12 PM


All times are GMT -4. The time now is 12:47 AM.


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