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 04-06-2016, 02:31 AM   #1
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 83
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Regex: exclude sequence

Hi, I'm using this regex to find all words ending with apostrophe, excluding the word po’.
Code:
(([^\s]..)|([^p].)|(.[^o]))’\b
Now I'd like to exclude other words (fa’, di’...), so I'm wondering if there is a way to exclude a sequence, something like:
Code:
(?!(\bpo|\bfa|\bdi))’\b
or
Code:
[^(<\bpo>|<\bfa>|<\bdi>)]’\b
(I know these examples don't work... but I hope I gave an idea about what I'm searching for)


Last edited by senhal; 04-06-2016 at 03:21 AM.
senhal is offline   Reply With Quote
Old 04-06-2016, 10:02 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The negative lookahead is a "zero-width assertion" -- it still needs something else to actually match a string.

See here for an excellent explanation: https://stackoverflow.com/questions/.../406408#406408
eschwartz is offline   Reply With Quote
Advert
Old 04-07-2016, 10:08 AM   #3
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 83
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Quote:
Originally Posted by eschwartz View Post
The negative lookahead is a "zero-width assertion" -- it still needs something else to actually match a string.

See here for an excellent explanation: https://stackoverflow.com/questions/.../406408#406408
Thanks, I'm reading it
senhal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEQUENCE 77 Darbarian Self-Promotions by Authors and Publishers 9 02-10-2013 05:03 PM
Malformed byte sequence: Invalid byte 2 of 3-byte UTF-8 sequence. Check encoding digireads ePub 3 04-26-2011 03:07 AM
Series sequence? Toxaris Sony Reader 9 04-09-2010 07:36 PM
Series sequence? Toxaris Calibre 5 04-09-2010 07:04 PM
PRS-300 Author sequence denmarks Sony Reader 1 10-05-2009 11:49 PM


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


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