On 08 Aug 2006, at 13:24 , Seth Dillingham wrote:
Create a test file called test.txt. Put a few lines in it, just one
word per
line (to keep it short and simple). Save it at ~/Desktop/test.txt
Open terminal, and run these two lines:
cd ~/Desktop
perl -pi -e 's/(.*)/($1)/' test.txt
The second line tells perl to run a search for every .*, and
replacing each
with the same text but wrapped in parentheses.
Open the file in BBEdit again, and you'll see that each line is
wrapped in
parens, and that's the only change.
So if a line contains just "foo", it will be replaced with "(foo)".
Now change the file back to the way it was (without the parens),
and run the
same find-and-replace in BBEdit:
- turn on grep
- search for (.*)
- replace with (\1)
and click "replace all". You get an extra set of empty parens at
the end of
every line.
This is a bug. (Never would have believed it if I hadn't seen it for
myself! ;-)
Have to agree it's a BBEdit bug then.
--
Kickboxing. Sport of the future.
--
------------------------------------------------------------------
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]>