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.


grep question

Adobe Community Professional ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

hi,

how do i tell it in GREP to make the word max subscript after a C

example:

this is what i have:

Screen Shot 2021-07-12 at 3.22.32 PM.png

this is whatt I want:

Screen Shot 2021-07-12 at 3.22.43 PM.png

thank you 

 

TOPICS
How to

Views

106

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 1 Correct answer

Advisor , Jul 13, 2021 Jul 13, 2021
\<[CT]\Kmax\>|\<t\K1/2\> (done in my car!   ) (^/)

Likes

Translate

Translate
Adobe Community Professional ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

This should work

(?<=C)max(?= )

It finds max when it is between a C and a space

Set the Change format to subscript.  you can also set this up as a GREP style if you define a subscript character style.

Screen Shot 2021-07-12 at 4.48.15 PM.png  Screen Shot 2021-07-12 at 4.50.36 PM.png

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

Copy link to clipboard

Copied

forgive me, i found an instance that breaks that rule, Cmax may sometimes be in a parenthesis:

Screen Shot 2021-07-13 at 9.31.36 AM.png

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

Copy link to clipboard

Copied

\<C\kmax\>

(^/)

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

Copy link to clipboard

Copied

that does not work, i also need a grep for  T1/2, see below

Screen Shot 2021-07-13 at 10.00.36 AM.png

 

 

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

Copy link to clipboard

Copied

\<[CT]\Kmax\>|\<t\K1/2\>

 

(done in my car!  😉 )

 

(^/)

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

Copy link to clipboard

Copied

that partially works. it does not honor it in parenthesis?  

Screen Shot 2021-07-13 at 10.54.35 AM.png

Screen Shot 2021-07-13 at 10.54.42 AM.png

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

Copy link to clipboard

Copied

It does!

 

(^/)

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

Copy link to clipboard

Copied

it does, forgive me. so many styles. you are 100% correct.

 

i tip my hat to you good man. 

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

Copy link to clipboard

Copied

question. intead of the 1/2, can we say any numbers? just incase i have 2/4, 1/3 or whatever other fraction they may want?

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

Copy link to clipboard

Copied

Change: 1/2 in \d/\d

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

Copy link to clipboard

Copied

LATEST
quote

that does not work, i also need a grep for  T1/2

 

By @JonathanArias

…and not for Tmax?

 

I had at the time many documents containing CO2, H2O, H2, O2, … Grep styles are great fun 😉

ABAMBO | Hard- and Software Engineer | Photographer

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

Copy link to clipboard

Copied

Hi @JonathanArias 

\b[CTt]\K(?:[/\d]+|max)\b

 

If "c" and "C" is required, you can try

\b(?i)[ct]\K(?:[/\d]+|max)\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