Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP: targeting “th” and apply superscript

Return to Member Forum

  • Author
    Posts
    • #14339363
      Kerry Macklin
      Participant

      Hi there,

      I’m working on several documents with school grades like this: 10th- to 12th-grade

      I need to target the “th” and apply superscript to just those letters, but I can’t seem to make a grep search work.

      This is what I tried, but it produces no results and I’m not sure where I’m going wrong: (?<=\d+)th(?=.)

      Any ideas? Much appreciated :)

      Kerry

    • #14339364
      Kerry Macklin
      Participant

      I figured it out!

      (?<=\d)th

      This did the trick.

    • #14339366
      Dhafir Photo
      Participant

      You can use this in GREP Style with superscript Character Style \d\K?(th|st|nd|rd)\> or this (?<=\d)\p{zs}?(th|st|nd|rd)\>

Viewing 2 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads