Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[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 <[email protected]>
To
[email protected]
Subject
Re: st: Use Regular Expressions to replace words/strings of characters in a text file
Date
Wed, 15 Aug 2012 01:07:39 +0100
-help filefilter-
Nick
On Tue, Aug 14, 2012 at 9:18 PM, tashi lama <[email protected]> wrote:
> I looked for previous posts and read and still can't find the solution. I could use stata's string functions(regexr, subinstr etc) to search and replace string in a string. But if I have a text file(test1.xml) that I need to run a search and replace on, how do I do it? Putting a text in a local macro( put aside the macro limitation) and using regexr wouldn't be an option because I have to generate a xml file from the dataset.
>
> view test1.xml
>
> <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
> <?mso-application progid="Excel.Sheet"?>
> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
*
* 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/