• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

What is this GREP expression?

New Here ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

This GREP expression is loaded in my InDesign file already. I don't know where it came from. Who put it there. But more importantly, what does it do??

 

\s(?=[–—"'\w[:punct:]]+$)

TOPICS
Scripting

Views

186

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
community guidelines
Guide ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

… associated to a "nobreak" char style to try to avoid a widow at the end of a para containing such a Grep style, nothing really interesting!

 

(^/)  The Jedi

Votes

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
community guidelines
Guide ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

More relevant (and simpler):

 

\H+\h\H+$

 

(^/)

Votes

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
community guidelines
New Here ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

Thank you!

 

Would this also accomplish the same thing?

 

.{15}$

 

This is one I use intentionally. I just never knew what that other one was or where it came from.

Votes

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
community guidelines
Guide ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

LATEST

Not exactly!

 

Sample (in french):

 

\H+\h\H+$ will give: "… faire une proposition indécente.", so maybe:

 

"… faire une 

proposition indécente."

 

.{15}$ will give: "… faire une proposition indécente.", so maybe:

 

"… faire une propo-

sition indécente."

 

(^/)

Votes

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
community guidelines