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

grep question

Guru ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

hey folks

how do i tell indesign to make "P" italic when infront of "-value" or "values". example: "P-values" or "P-value"

 

thanks

jonathan

TOPICS
How to

Views

297

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 3 Correct answers

Community Expert , Jul 14, 2021 Jul 14, 2021

Hello @JonathanArias 

Grepstyles could work. See the screenshot below

Screenshot 2021-07-14 at 10.15.19 PM.png

-Manan

Votes

Translate

Translate
Guide , Jul 14, 2021 Jul 14, 2021

Why complicate a Grep syntax?

 

P(?=-value)

 

(^/)  The Jedi

Votes

Translate

Translate
Community Expert , Jul 15, 2021 Jul 15, 2021

Hi @Manan Joshi 

how about

P(?=-values?\b)

Votes

Translate

Translate
Community Expert ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Hello @JonathanArias 

Grepstyles could work. See the screenshot below

Screenshot 2021-07-14 at 10.15.19 PM.png

-Manan

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
Guru ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

thank you!

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Why complicate a Grep syntax?

 

P(?=-value)

 

(^/)  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
Community Expert ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

Hi @FRIdNGE,

Agreed, I think both mine and your grep has issues. In mine the first group is unnecessary I just noticed it. However in both our statements we would match P-valued as well but as per the query, this should not match. So how about the following

P(?=-value[s\s])

-Manan

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
Community Expert ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

Hi @Manan Joshi 

how about

P(?=-values?\b)

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
Community Expert ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

LATEST

Perfect. I always used ? for its non-greedy property. This use totally escaped me

-Manan

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