Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-06-2018, 10:18 AM   #1
wlashack
Member
wlashack began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2018
Device: none
Question Someone helps with regex, please?

Hello,
In my ebooks I need to Find/Replace every "one-character word plus the space behind it" by the "one-character word and the non-breaking space behind it".

The list of one-character words is: s z k v a i o u

I think regex in Find/Replace is the way but it is out of my logic capabilities. Can someone experienced in regex wtite me the code to put in the Find and Rerplace fields in Sigil?

Thanks a lot.
wlashack is offline   Reply With Quote
Old 04-06-2018, 10:30 AM   #2
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
One of the possible solutions:

Find:
Code:
(?<=\s[szkvaiou])\s+
Replace:
Code:
&nbsp;
BeckyEbook is offline   Reply With Quote
Advert
Old 04-06-2018, 10:41 AM   #3
wlashack
Member
wlashack began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2018
Device: none
Thanks a lot, it works!
wlashack is offline   Reply With Quote
Old 04-06-2018, 12:11 PM   #4
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
I think that may have replaced
space-character-space
with
space-character-nonbreakingspace
instead of
nonbreakingspace-character-space.

Or else I've not understood the regex properly.
pdurrant is offline   Reply With Quote
Old 04-06-2018, 12:16 PM   #5
wlashack
Member
wlashack began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2018
Device: none
Quote:
Originally Posted by pdurrant View Post
I think that may have replaced
space-character-space
with
space-character-nonbreakingspace
instead of
nonbreakingspace-character-space.

Or else I've not understood the regex properly.
I do not understand regex, but it works well. It replaces the space after a one-character word by nonbreakinspace.
wlashack is offline   Reply With Quote
Advert
Old 04-06-2018, 12:43 PM   #6
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
In that case, I understood it correctly. Thanks.
pdurrant is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HeLpS NeEdEd AlL oF yOu! Especially U.K and U.S members spiritshaman14 Reading Recommendations 21 03-21-2014 09:54 AM
Google helps fight piracy HansTWN News 24 08-14-2012 01:11 PM
Thank you to everyone who helps with the Iriver Story! tjgoldstein iRiver Story 0 12-19-2011 01:29 AM
Kindle helps ebook prices JSWolf Amazon Kindle 6 11-20-2007 05:53 PM


All times are GMT -4. The time now is 06:16 AM.


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