Skip to main content
Inspiring
January 13, 2022
Question

GREP to find superscript whole word

  • January 13, 2022
  • 3 replies
  • 283 views

Hi All,

Im find diffculties in identify the whole word (TM) in paticular scenario.

Example text: 

Note: TM is in superscript

Ro dolut fugia TMdolorem quasIllenetusam TM am delesTM reiustATM, officiat velendiorpos as TMAdolorrumque nam volor ma non num quisTMvolore.

I had used  \<(?i)TM\>  in GREP.

Result i got:   TMdolorem, quasIllenetusam TM am.

But I'm unable to get these possibilites: delesTM , quisTMvolore

Kindly help me in this.

Thanks

This topic has been closed for replies.

3 replies

m1b
Community Expert
Community Expert
January 14, 2022

I'd use TM/>, because in English at least I don't know any words that end in TM. Make sure you don't match, say, DEPARTMENT. Below is  an example using a character style called "superscript".

- Mark

 

EDIT: This will still incorrectly find some acronyms, eg. "ATM" (automatic telling machine).

 

 

jctremblay
Community Expert
Community Expert
January 13, 2022

Remove the \< and \> they means begining and end of word.

 

Community Expert
January 13, 2022

If you just need to find TM irrespective of whether it is superscript or not you can use the following

(?i)TM

You can remove (?i) if it's always TM and you don't need to look for cases like tm, Tm etc

If you have to look only for TM in superscript then in addition to the above grep use the find format option of the find/change dialog and select superscript as the option

I don't understand why you use \<\> in your grep statement, maybe I am missing something but as far as I can undertand it will literally search for TM enclosed in <>. But your question states you are concerned only about TM

-Manan

-Manan