Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

94

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

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

Copy link to clipboard

Copied

More relevant (and simpler):

 

\H+\h\H+$

 

(^/)

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
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.

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
community guidelines
Advisor ,
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."

 

(^/)

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