GREP Question

Learn / Forums / InDesign User Groups / GREP Question

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #92390

      Hey,

      im often doing restaurant menus and there i have to add some characters to meals and ingredients which have to be set uppercase. And i want GREP to do that for me. But i dont get the right formula…

      So for example: Normally the uppercase number oder letter is at the end of a word and can be 1 or 2 characters, which are separated by commas, they can be there one or more times. E.g. Can look like this: “Menu 1 with Coke1,7, Cheese1,2,A, Bacon2,3,10,L”. The problem is that my Grep code also set numbers in uppercase of the price “12,40€” Thats why i created following my Grep-Stil: (?<=[\l\u])\d+?\>(?!€) works with the first digit, but only for that one rest is untouched. I need one thats sets all uppercase number, letters and commas between uppercase but ignores the last comma, because this seperates it from the other ingriedents..

      Sorry for my english, just a german guy trying to explain complicated stuff.. :D

    • #93519
      Aaron Troia
      Participant

      Hey Christoph,

      I might not totally understand what you are trying to do, but it sounds like you only want to add styles to number following menu items, but not the price, your GREP is actually super close, try adding a comma to your positive lookbehind like this:

      (?<=[\l\u,])\d+?\>(?!€)

      I’ve tested this in InDesign with your example text and it only finds the menu item numbers and not the price on my end. Anyway let me know if that works or not on your end.

      Aaron

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>