Highlighted

Find missing space between period and text

Explorer ,
Jun 17, 2020

Copy link to clipboard

Copied

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?

 

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

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

TOPICS
Formatting and numbering, Scripting

Views

107

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Find missing space between period and text

Explorer ,
Jun 17, 2020

Copy link to clipboard

Copied

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?

 

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

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

TOPICS
Formatting and numbering, Scripting

Views

108

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 17, 2020 0
Adobe Community Professional ,
Jun 18, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2020 1
Adobe Community Professional ,
Jun 22, 2020

Copy link to clipboard

Copied

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.

fm2.png

 

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2020 0