Skip to main content
Inspiring
Feb 25, 2021 2:10 PM UTC
Answered

Find and replace text and glyph m2

I'd need to replace all the "m2" in the document with the "m" followed by (the little) apex "2" (Unicode: 00B2). Can't use the glyphs tab because it's not a matter of replacing an existing glyph but to turn a text into another text that ALSO has an unicode character. Very few about this available online.... only me having this need? Workarounds? (p.s.: need to apply a "replace all" because it's a huge amount of pages. Thnx.

 

This topic is closed to new replies. Start a new post to keep the conversation going.
jctremblay
jctremblayCorrect answer
Community Expert
Feb 25, 2021 2:22 PM UTC

Try this...

Find: 

m\K2

Change:

\xB2

 

10 replies

Participant
Oct 30, 2024 8:16 AM UTC

Translate
aniri5j9ox8tw2ln
Legend
Jul 6, 2023 9:40 AM UTC

Hello, I would also need this grep function, but the tips in the answers do not work in CC version 2023. If it finds m2 it replaces me with m\xB2 or m\xK2. Can anyone help me? Thank you very much!

 

P.S. and I need the same grep function to change all CO2 to CO₂...

Translate
aniri5j9ox8tw2ln
Legend
Jul 6, 2023 11:50 AM UTC

Ok, I was able to solve it at least for m2 like this: find (?<=\<m)2\> and replace with -> Format > Position Superscript

 

For the CO2: find (?<=\<CO)2\>  and replace with the format position Subscript

Translate
Robert at ID-Tasker
Legend
Jul 6, 2023 12:07 PM UTC

You should apply CharStyle - not local formatting / override. 

 

Translate
vladan saveljic
Inspiring
Feb 26, 2021 9:06 AM UTC

... Find:m2, Replace:m\xK2 ...

This can't be correct grep

Translate
jctremblay
Community Expert
jctremblayCommunity ExpertCorrect answer
Community Expert
Feb 25, 2021 2:22 PM UTC

Try this...

Find: 

m\K2

Change:

\xB2

 

Translate
Gioyer07Author
Inspiring
Feb 26, 2021 8:18 AM UTC

Thanks.... seems it doesn't work for me. I've tryed both in Text and GREP tab but result is that are no matches to change.

Translate