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 find character between two characters

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #110757

      Hey guys,
      just cannot figure it out… so help needed.

      I have this string (in product data):
      BL-s3

      And I’d need to set the letter “L” as subscript. I figured out, if I use GREP style to find the “L” between “B” and “-“, I could set it to use character style that is set to subscript.

      But cannot figure out what should be the GREP string. Any help?

    • #110758

      B\KL(?=-)

    • #110759

      Hi Tero,
      you need to use a positive lookbehind before the “L” character and a positive lookahead after, the grep string looks like this:
      (?<=B)L(?=-)

      Here you are a screenshot of the result:
      https://www.dropbox.com/s/3rjknhv98eilohu/subscript%20S.png?dl=0

      Hope this helps

    • #110760

      Thanks guys! Seems like both strings works in my case :)

    • #110761

      Aha! I shot a second earlier! Claudio is lying in the dust! =D

      Best,
      Lucky Mike, the guy who shoots faster than his shadow

    • #110762

      Haha!

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