Skip to main content
Inspiring
Jun 18, 2020 3:24 AM UTC
Answered

Find missing space between period and text

With the basic search command (with regular expression checked), I could able to find the instances where there is period followed by any word or number by the expression \.\w And with the expression \.\u I could able to find period followed by an upper case letter (preferred) without space in between.

But in the replace window if I give \.\s\u it doesn't work. It replaces the capital letter with the letter 'u'.

  1. I suppose if I write a extendscript it may work. Or
  2. Is there a way to add the expression \.\u for the auto spell check to find, thus a red squiggle will appear on these instances?

 

This topic is closed to new replies. Start a new post to keep the conversation going.
frameexpert
frameexpertCorrect answer
Community Expert
Jun 18, 2020 11:55 AM UTC

You need to "capture" parts of your regular expression matches with parenthesis so you can restore them in the Change field.

 

Find: (\.)(\u)

Change: $1 $2

www.frameexpert.com

2 replies

Barb Binder
Community Expert
Community Expert
Jun 22, 2020 4:04 PM UTC

You can also tell Fm to flag two words with a period but no space in between by disabling Words Containing . in Edit > Preferences > Spelling Options. When you right click over the squiggle, Fm will offer the correction with the space.

 

But I'd use the RegEx that Rick provided as part of the document clean-up if you have a typist who repeatedly forgets to add spaces between sentences.

 

~Barb

Translate
~Barb at Rocky Mountain Training
frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
Jun 18, 2020 11:55 AM UTC

You need to "capture" parts of your regular expression matches with parenthesis so you can restore them in the Change field.

 

Find: (\.)(\u)

Change: $1 $2

Translate
www.frameexpert.com