Find and replace single with double space between sentences
Find and replace single with double space between sentences
I did a search looking for how to replace a single space between sentences with a double space but only found old forum posts that I remembered. I have scanned in pages with OCR that I want to change the single space to double in narrative heavy fiction. 100s of pages. Is there a better way to do this now with the latest release of Atlantis?
Atlantis 5
Windows 11 Pro for Workstations
Windows 11 Pro for Workstations
Hi Alan,
The following wildcard Find/Replace might do the trick:
Find What:
Replace With:
Don’t forget to check the “Use wildcards” box.
Of course, this assumes that all your sentences begin with an uppercase letter.
HTH.
Cheers,
Robert
The following wildcard Find/Replace might do the trick:
Find What:
Code: Select all
(.^32)(^U)Code: Select all
\1^32\2Of course, this assumes that all your sentences begin with an uppercase letter.
HTH.
Cheers,
Robert
Hi Robert,
Thanks for the replace with code. I could not figure a way to add a blank space in the middle of the string.
I have gone ahead and started doing this manually using F3 to find the next occurrence with 1 hand and the mouse with the other hand to position the adding of the space. I found that there are so many abbreviations (common ones being Dr., Mr. Mrs.) in the text I was working on that were being found with the search string. To combat this problem for myself I am using the Unicode Arabic Full Stop character which looks similar to a period to end abbreviations, which stops them being found by the search string. Now I have added an abbreviations dictionary to account for these showing as unrecognized. With the abbreviations cleaned up in the text using your tip will make adding a second blank space a breeze.
Thanks for the replace with code. I could not figure a way to add a blank space in the middle of the string.
I have gone ahead and started doing this manually using F3 to find the next occurrence with 1 hand and the mouse with the other hand to position the adding of the space. I found that there are so many abbreviations (common ones being Dr., Mr. Mrs.) in the text I was working on that were being found with the search string. To combat this problem for myself I am using the Unicode Arabic Full Stop character which looks similar to a period to end abbreviations, which stops them being found by the search string. Now I have added an abbreviations dictionary to account for these showing as unrecognized. With the abbreviations cleaned up in the text using your tip will make adding a second blank space a breeze.
Atlantis 5
Windows 11 Pro for Workstations
Windows 11 Pro for Workstations
Addendum.
Here is from Spaces Following a Period
The following wildcard Find/Replace takes into account sentences ending with exclamation or question mark:
Find What:
Replace With:
Here is from Spaces Following a Period
This said, if you still want to have your sentences starting with 2 space characters, you need to take into account the sentences ending with exclamation or question mark.<i>Publications in the United States today usually have the same spacing after a punctuation mark as between words on the same line. Since word processors make available the same fonts used by typesetters for printed works, many writers, influenced by the look of typeset publications</i>, now leave only one space after a concluding punctuation mark<i>. In addition, most publishers' guidelines for preparing a manuscript on disk ask authors to type only the spaces that are to appear in print.
Because it is increasingly common for papers and manuscripts to be prepared with a single space after all punctuation marks, this spacing is shown in the examples in the MLA Handbook and the MLA Style Manual. As a practical matter, however, there is nothing wrong with using two spaces after concluding punctuation marks unless an instructor or editor requests that you do otherwise. [Emphasis added.]</i>
You should take a word-processed document, and globally replace all "two spaces" with "one space." Then print it out. We think you'll prefer the new, more modern one-space rule.
The following wildcard Find/Replace takes into account sentences ending with exclamation or question mark:
Find What:
Code: Select all
([.\!\?]^32)(^U)Code: Select all
\1^32\2Thanks Robert. This is making it even easier for me.
I will be adding the 4th character end of sentence ellipsis character to this plus the quoted narrative beginning or end of sentence as over half of the heavy narrative fiction is quoted. As I am going through the fiction OCR scan I have found it reading an ellipsis as 3, 4, or 5 periods in a row. There is going to be very little effort now to add the 2nd between sentence space.
The biggest problem now, which is not from Atlantis, is the OCR reading of words as the document seems to have a mix of UK and US English in it.
I will be adding the 4th character end of sentence ellipsis character to this plus the quoted narrative beginning or end of sentence as over half of the heavy narrative fiction is quoted. As I am going through the fiction OCR scan I have found it reading an ellipsis as 3, 4, or 5 periods in a row. There is going to be very little effort now to add the 2nd between sentence space.
The biggest problem now, which is not from Atlantis, is the OCR reading of words as the document seems to have a mix of UK and US English in it.
Atlantis 5
Windows 11 Pro for Workstations
Windows 11 Pro for Workstations
As an update I ended up with 2 search strings which covers all cases where I want 2 spaces between sentences, they follow.
([.\?\!…])(^32[^U"])
([.\?\!…]")(^32[^U"])
I found the 2nd string can be used with replace all to get the desired result.
The 1st string I used manually to not add a second space after an abbreviation like Mr. Jones.
I made F4 a Hot Key for Replace next which along with the default F3 Hot Key for Find next allowed me to very quickly go through 50 to a 100 results with 2 fingers and pressing F3 when an abbreviation was highlighted instead of pressing F4 to add a 2nd space with the Replace with string which follows.
\1^32\2
([.\?\!…])(^32[^U"])
([.\?\!…]")(^32[^U"])
I found the 2nd string can be used with replace all to get the desired result.
The 1st string I used manually to not add a second space after an abbreviation like Mr. Jones.
I made F4 a Hot Key for Replace next which along with the default F3 Hot Key for Find next allowed me to very quickly go through 50 to a 100 results with 2 fingers and pressing F3 when an abbreviation was highlighted instead of pressing F4 to add a 2nd space with the Replace with string which follows.
\1^32\2
Atlantis 5
Windows 11 Pro for Workstations
Windows 11 Pro for Workstations