![]() |
#1 |
Junior Member
![]() 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! |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,270
Karma: 78869092
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Search for: ([a-z])([A-Z])
Replace by: \1 \2 Note the space between the \1 and the \2 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2012
Device: Nook
|
Thank you so much! This also clears up something I wasn't quite understanding with another code of mine. Thanks again!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Wildcards/Regex Find/Replace | Adman35 | Sigil | 7 | 08-16-2014 01:02 PM |
Regular Expression: does not replace with spaces | murphycc | Conversion | 3 | 02-11-2012 01:31 PM |
RegEx: Removing Page Numbers that have Spaces | captainslow | Conversion | 2 | 02-27-2011 04:14 PM |
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 |