At 04:59 -0700 07/08/2012, Mosby wrote: >I have data that looks similar to this... > [... example elided ...] > >There are tabs after the zip codes. > >I want to skip the zip codes and only find the lines that do not begin >with a zip code. Once those lines are located I want to remove the return >at the end of the previous line and replace it with a space. Every GREP >pattern I have tried to use always finds the zip code as well. There are >tabs only after the zip codes, no tabs are found on the other lines.
If I understand the task correctly, try something like this: Find: \r([^\t]+?)$ Replace: " \1" [without the double-quotes] In order to replace the return in the previous line, you must include it in the pattern \r then use a character class which matches any character that is *not* a tab [^\t] repeated one or more times + non-greedily ? to match the contents of the entire current line, wrapped in parens to define a sub-pattern, and $ to match the end of line. The replacement pattern is just the space you want to insert " " plus the contents of the matched line returned by the first (and only :) subpattern \1. Regards, Patrick Woolsey == Bare Bones Software, Inc. <http://www.barebones.com> P.O. Box 1048, Bedford, MA 01730-1048 -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
