• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
2

GREP Style Help - Subscripting Chemical Formulas

New Here ,
Jan 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

Hello there! 

I'd like to create a GREP script for a project I'm working on. This particular document is going to be talking about CO2, N2, and CH4. I would like those numbers to be subscripted. Here's the kicker though...the company I work for, CO2Meter, is also mentioned in this document. I DON'T want that 2 to be subscripted. Below is a script I've found that is working for the subscripting. I just need to add in how to NOT have the '2' in CO2Meter get subscripted. Any suggestions would be incredibly helpful!

 

((?<=Na|Cl)|(?<=H|C|O|S|N))\d{1,3}(?!\d)

TOPICS
How to , Scripting

Views

915

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 , Jan 18, 2021 Jan 18, 2021

Change (?!\d) at the end for (?!\d|Meter)

Votes

Translate

Translate
Community Expert ,
Jan 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

Change (?!\d) at the end for (?!\d|Meter)

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 ,
Jan 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

You, my friend, are a lifesaver! Thank you so much.

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 Beginner ,
Feb 05, 2024 Feb 05, 2024

Copy link to clipboard

Copied

LATEST

Hi Kara,
can you share you script ? I'm interested.

thanks

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