How do I make GREP stop?

Learn / Forums / General InDesign Topics / How do I make GREP stop?

Viewing 1 reply thread
  • Author
    Posts
    • #75036

      I have a document that includes a list of people with names, titles, phone numbers and e-mail addresses (the list is bulleted, but I didn’t feel like figuring out the HTML for that):
      John Doe, Project Manager, (555) 555-5555, [email protected]

      I have set up a paragraph style for this list that includes a nested style that applies a Bold Blue character style to the person’s name, and also includes a GREP style that applies the No Break character style to e-mail addresses. I used the “More Robust E-mail” GREP expression that David lists in his “Favorite GREP expressions You Can Use” article. (I tried to duplicate it here, and it kicked me out of the forum)

      This seems to work well when I apply it to previously typed text, but if I attempt to add another line to the bulleted list, the additional text is all formatted with the No Break character style. How do I make the GREP style stop at the end of each paragraph?

      If anyone answers, I would really love it if you could explain why I am having this issue, and how your new expression fixes the problem–I am really green with GREP, and would love the opportunity to learn from this.

    • #75048
      Masood Ahmad
      Participant

      Hi, there seems to be some problem either with the text or with some style. The GREP code that you have taken from David’s post is okay.

      Try once again:

      Apply Style: No Break
      To Text: [-\u\l\d._]+@[-\u\l\d_]+\.[\u\l]{2,4}

      Or you can also try this GREP code to your paragraph Grep-style:

      [-.\w]+@[-\w]+\.[\u\l]{2,4}(\.[\u\l]{2})?

      In case, if it still don’t work, I would request you to give some sample text from your InDesign file.

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