Skip to main content
JonathanArias
Legend
August 31, 2018
Answered

Grep question pt2

  • August 31, 2018
  • 3 replies
  • 309 views

Hi, next question. how can i do a grep style where i tell indesign to apply a superscript to the number after "kg/m", see screenshot below.

Thanks

Jonathan

    This topic has been closed for replies.
    Correct answer vladan saveljic

    try this one:

    find:

    kg/m\K\d+

    or if you have always and only the number 2 after kg/m

    kg/m\K2

    change:

    format superscript

    3 replies

    JonathanArias
    Legend
    August 31, 2018

    That did it. like the one where it would read any number. thanks!

    Barb Binder
    Community Expert
    Community Expert
    August 31, 2018

    So wouldn't \K work here, too? (Add a plus if there can be more than a single digit).

    kg/m\K\d

    ~Barb

    ~Barb at Rocky Mountain Training
    vladan saveljic
    vladan saveljicCorrect answer
    Inspiring
    August 31, 2018

    try this one:

    find:

    kg/m\K\d+

    or if you have always and only the number 2 after kg/m

    kg/m\K2

    change:

    format superscript

    Barb Binder
    Community Expert
    Community Expert
    August 31, 2018

    Sorry, Vladan. I hopped over here after reading the answer to Jonathan's first GREP question without noticing that you already had recommended \K.

    ~Barb

    ~Barb at Rocky Mountain Training
    vladan saveljic
    Inspiring
    August 31, 2018