Reply To: GREP to replace long row of periods with tab

Home Page / Forums / General InDesign Topics (CLOSED) / GREP to replace long row of periods with tab / Reply To: GREP to replace long row of periods with tab

#55164

A quick GREP primer: One-or-more is +. Any character is . so it's not a good idea to use this … Put a backslash before it to make it literal: . That makes the search expression

.+

and you should replace it with a simple tab:

t

Now hold on before you run off: that one-or-more means that a single period will also be replaced by a tab. I bet that's not what you had in mind, so let's make sure it only works with, say, 3 or more. This, instead, would work

…+

but you can go for a fancy notation as well:

.{3,}

No need for a plus! The {3,} part means: at least three times and an unlimited max (as there is no number given). (Some useful variants could be {3} to only find sets of 3 periods, or {3,5} to only find sets of 3, 4, and 5 periods.)

This article was last modified on March 15, 2010

Comments (0)

Loading comments...