I just tried this out of interest and get a very strange result - lots of funny chars appended to the existing string:

foo1.jpg i湧 4Ұـ耀
foo2.jpg i湧 4Ұـ耀
foo3.jpg i湧 4Ұـ耀
foo4.jpg i湧
foo5.jpg

I get this on two different machines (dual G4 and dual G5). Any idea what happens here?

Best, Achim.

Am 14.08.2006 um 17:19 schrieb Ronald J Kimball:

On Mon, Aug 14, 2006 at 07:45:34AM -0700, Dominick Cancilla wrote:
I've got a GREP problem I can't seem to wrap my head around.

I have a text file in which a number of file names are listed like this:

foo1.jpg
foo2.jpg
foo3.jpg
foo4.jpg
foo5.jpg
etc.

I'd like to end up with a file like this:

foo1.jpg foo2.jpg foo3.jpg
foo2.jpg foo3.jpg foo4.jpg
foo3.jpg foo4.jpg foo5.jpg
etc.

Any suggestions?

If I'm understanding your example properly, you want each filename in the
file to be followed on the same line by the next two filenames...

Find:

(\S+)\r(?=(\S+)(?:\r(\S+))?)

Replace:

\1 \2 \3\r

(?=) is a positive look-ahead that matches without consuming, so that the
next match starts on the next line rather than three lines down.

This will put an extra space at the end of the second-to-last line,
unfortunately.  I'm not sure that can be avoided with a single grep.

Ronald

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>



--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to