Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2014, 11:21 PM   #1
JoeBloe
Junior Member
JoeBloe began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2014
Device: Android Cool Reader
Curious problem with find/replace & regex

calibre 2.6
Windows 8.1
In searching for a particular combination
Quote:
find: (’)(\w{3,})
replace: \1 \2
it would find them quite handily, but when trying to replace it would give an error on some examples. When trying to replace
Quote:
‘own ends’—what might those be?”
it would give error
Quote:
calibre, version 2.6.0
ERROR: Cannot replace: Currently selected text does not match the search query. You must first click Find, before trying to replace
Now that I look back, it should not be finding that example at all, as an EM DASH is not a \w.(unless I am mistaken about this flavor of regex???)
JoeBloe is offline   Reply With Quote
Old 11-07-2014, 04:45 AM   #2
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
I just tested it for you -- an em dash is NOT a \w.
Phssthpok is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
regex cannot find to replace eschwartz Editor 11 02-03-2014 11:00 PM
Regex Help: Find page number & Replace+Remove 2x Line Breaks in Sigil Contre-jour Sigil 9 02-01-2013 10:47 AM
Weird problem with Find & Replace lastjuan Sigil 3 01-17-2013 03:55 AM
RegEx find and replace iblesq Sigil 1 01-10-2011 09:26 PM
REGEX find and replace help please potestus Sigil 13 09-18-2010 04:14 PM


All times are GMT -4. The time now is 11:02 AM.


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