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

GREP find/replace

New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Trying to figure out GREP find and change code for a particular character in this case below an

en dash: (~=) to the end of the paragraph

Screenshot 2017-07-26 14.05.38.png

Arch A. Moore, III – Executive Vice President, Middleburg Market Executive

to

Arch A. Moore, IIIExecutive Vice President, Middleburg Market Executive

This is probably a very ease one. Appreciate the help if you can give it.

Thanks,

Scott

Views

949

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

correct answers 1 Correct answer

Community Expert , Jul 26, 2017 Jul 26, 2017

Easy with a GREP Style, no need for search and replace.

The GREP expression is (?<=–).+

That’s an en-dash before the closing parenthesis. In this example the en dash is not italicized.

(?<=

This is a positive look behind. It finds text that follows the specified character or characters.

The en dash for the positive look behind to find.

)

The closing parenthesis for the positive look behind expression

.

Wildcard, meaning any character

+

Repeat one or more times. This is applied to the wildcard, meaning the

...

Votes

Translate

Translate
Community Expert ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Easy with a GREP Style, no need for search and replace.

The GREP expression is (?<=–).+

That’s an en-dash before the closing parenthesis. In this example the en dash is not italicized.

(?<=

This is a positive look behind. It finds text that follows the specified character or characters.

The en dash for the positive look behind to find.

)

The closing parenthesis for the positive look behind expression

.

Wildcard, meaning any character

+

Repeat one or more times. This is applied to the wildcard, meaning the expression will find any characters after an en dash up to the end of the paragraph.

Screen Shot 2017-07-26 at 11.12.57 AM.png

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
LEGEND ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

–\h\K.+

(^/) 

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 ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Thanks Obi-Wan!

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 ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

Thanks Scott!

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
Enthusiast ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

LATEST

Or even a nested style, using None through the first dash, and italic through the first forced line break.

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