On Fri, Aug 18, 2006 at 08:49:27PM +0200, Achim Siebert wrote: > 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?
This must be a bug, either in BBEdit or in PCRE. It looks like the matched substrings aren't preserved for capturing parentheses inside a lookahead, so it's reading from an uninitialized buffer. A Perl script with the same replacement does work: #!/usr/local/bin/perl use strict; local $/; $_ = <>; s/(\S+)\n(?=(\S+)(?:\n(\S+))?)/$1 $2 $3\n/g; print; __END__ 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]>
