Quote:
Originally Posted by Phil_C
I can't get that or variations to do anything in Book Cleaner. Is "vim" different from Regular Expressions? The only reference I have is the list of Reg Exp in the Book Designer help section.
|
No VIM is a "Vi" clone text editor that as Regular Expressions built into it. It's my favorite text editor but it is very hard learn, but once you learn it is fantastic. (Also you might have remove the Escape mask "\" in front of the "+" since the "+" is a command in VI.
I'd try
'\s*\n+\s*\d{1,4}\s*\n+([a-z'"]{1,2})/ \1/'
>> Ignore the single quotes
Note that I added "\s*" because there can be hidden spaces the \s* will remove any space or ignore if there is no space.
Also limit the page number size from 1-9999 so you don't replace text that is a valid number. Last only conat the string if the next paragraph starts with a lower cap letter or a double or single quote. Note the \1 adds what is in the () in the replace text. Some RegEx use $1 you'll have to play around. VIM uses \1
Then run
'\s*\n+\s*\d{1,4}\s*\n+[A-Z'"]/\n\1/'
To fix paragraphs with capital letters letters
=X=