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 Newcomer

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #90961
      James Mossop
      Member

      I’m looking at styling a table and looking at using greps for formatting. (which I have no knowledge of) what I’m looking to do is bold the first word in the table which is the place name leaving the rest normal. like

      Leicester street name

      in some instances though the place name is more than one word

      Earls Barton street name

      Is this any easy thing to do & if so any pointers?

      thanks
      james

    • #90965

      James, what is the rule to distinguish, if the second entry is part of the place name or the street? If there is no rule, there is no GREP …

      Kai

    • #90969

      Hi James,

      Kai has a point. Grep uses a REGEX, or regular expression. Think of it as a way of abstracting the searches. For example, if I want to find every occurrence time in my document and I know my times look like 10:00 or 1:00 you can see that it follows a pattern — numbers a colon more numbers. There is a pattern there in the characters.

      I don’t see the pattern in the Leicester or Earls Barton.

      Learning grep isn’t that easy and unless I am mistaken, your current issue isn’t a great example to get you started.

    • #90998
      Tom Pardy
      Member

      If you were to place a comma after the place name, this would provide a pattern. But the solution then would not need to be grep. You could do it simply with a nested style in your paragraph style and using a simple bold character style.

    • #91002
      Ward Baxter
      Member

      I don’t like altering the original data, but if used used a non-breaking space between “Earls Barton” and other instances like that, you could use an expression such as:
      ^[\w~S]+

      Alternatively, if you had a comprehensive list of place names, you could incorporate them as alternation, such as:
      (Leicester|Earls Barton|etc)

    • #91031
      James Mossop
      Member

      thanks for the guildence everyone, at the minute i’ve put a pargaph style to bold the first word & then another in the nested styles list to normalise the rest, but will have a look through the above and see what i can do.

      thanks
      james

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