View Single Post
Old 08-10-2012, 06:54 PM   #1
essayhead
Junior Member
essayhead began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2012
Device: Nook
Regex Find and Replace - Spaces

Hi all, I have a quick Regex question. I converted a crappy PDF into HTML and then into EPUB. So I was cleaning it up in Sigil and realized that there are some issues with the text itself. There are a bunch of words that have been shoved together without any spaces, but there's generally a pattern--they show up when prepositions are in front of proper names. Namely, I can tell what most of them are by running

[a-z][A-Z]

in the Find box with Regex. Now the question is, what is the correct way for me to insert a space so that "inLondon" becomes "in London" and so on? I've been using Regex to just find them and insert the space manually, but there is a lot of them. And, yes, those errors in the original file as well. So is there a formula that I can put in the Replace box? Or is this just not possible at all? I don't know, I honestly just discovered Regex and I'm verrry slowly learning it. Any help would be greatly appreciated. Thanks!
essayhead is offline   Reply With Quote