grep question

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

82

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

correct answers 3 Correct answers

Adobe Community Professional , Jul 14, 2021 Jul 14, 2021
Hello @JonathanArias  Grepstyles could work. See the screenshot below -Manan

Likes

Translate

Translate
Advisor , Jul 14, 2021 Jul 14, 2021
Why complicate a Grep syntax? P(?=-value) (^/)  The Jedi

Likes

Translate

Translate
Adobe Community Professional , Jul 15, 2021 Jul 15, 2021
Hi @Manan Joshi  how about P(?=-values?\b)

Likes

Translate

Translate
Adobe Community Professional ,
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

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

Copy link to clipboard

Copied

thank you!

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

Copy link to clipboard

Copied

Why complicate a Grep syntax?

 

P(?=-value)

 

(^/)  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
Adobe Community Professional ,
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

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

Copy link to clipboard

Copied

Hi @Manan Joshi 

how about

P(?=-values?\b)

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

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