How to find a character when it appears at the end of a line?

New Here ,
Apr 28, 2022 Apr 28, 2022

Copy link to clipboard

Copied

I am laying out a document that includes small verse numbers. I want to search for instances when an orphaned verse number appears at the end of a line, so a soft return can be inserted before it. (see attached screenshot)

 

Is there a way to do this in the Find/Replace panel or through GREP?

TOPICS
How to , Type

Views

123

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
Adobe Community Professional ,
Apr 28, 2022 Apr 28, 2022

Copy link to clipboard

Copied

Hi @tdykstra57,

I don't think we can find end of lines using Find/Change panel. A script could help, are you open to using a script? Another question, how do we find this verse number? Are all the numbers in the text to be identified as verse numbers or the one's that are number and have a specific character style applied to it?

-Manan

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
Contributor ,
Apr 28, 2022 Apr 28, 2022

Copy link to clipboard

Copied

Diese Zahlen in der Suchen/Ersetzen Funktion nach Farbe und Größe ausfindig machen... Das heißt unter Text und dann unten beim Kästchen wo rechts das T und die kleine Lupe ist, darauf klicken: hier kannst du nach allen Stilen suchen. Dann würde ich händisch den Zeilenumbruch einfügen.

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
Guru ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

Check out my Find Text in Location script.

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
Adobe Community Professional ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

The end of a line is not a location you can find via a GREP search. You can do end of paragraph or beginning of paragraph but not end of line. I'm thinking you could create a No Break character style, then do a GREP search for something like this 

\d+ [\l\u]+ that will find any digits followed by a space and a string of letters and then apply the No Break character style to it. It will include elements not at the end of the line but it shouldn't really affect them adversely.

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
Adobe Community Professional ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

Have you considered putting in a non-breaking space just after the verse numbers? Perhaps with a character style also to define the width of the non-breaking space?

Mike Witherell

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
Adobe Community Professional ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

LATEST

This is a whole lot better solution than adding a forced line break. Down the road edits could cause short lines whre you don't want them withthe forced breaks, but not with the non-breaking spaces.

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