Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Use Regular Expressions to replace words/strings of characters in a text file


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Use Regular Expressions to replace words/strings of characters in a text file
Date   Thu, 16 Aug 2012 20:41:30 +0100

The only legal construct with -file close- is

file close {handle|_all}

I can't see any reason to suppose that opening any other file is
necessary, nor that it would be useful.

Nick

On Thu, Aug 16, 2012 at 7:42 PM, tashi lama <ltashi32@hotmail.com> wrote:
> well, it writes the line if it finds "Cell" in the line except that it overlaps in the old file tt.xml. I guess I need to open another empty file and dump the line there.
>
> ----------------------------------------
>> Date: Thu, 16 Aug 2012 19:18:40 +0100
>> Subject: Re: st: Use Regular Expressions to replace words/strings of characters in a text file
>> From: njcoxstata@gmail.com
>> To: statalist@hsphsun2.harvard.edu
>>
>> That's not a fix to anything. It's not even legal.
>>
>> Nick
>>
>> On Thu, Aug 16, 2012 at 7:15 PM, tashi lama <ltashi32@hotmail.com> wrote:
>> > Thanx...I forgot to put the increment in the while loop
>> > while ...{
>> >
>> > ....
>> > file close myfile line
>> > }
>> >
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index