Re: sed help

Douglas O'Neal <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization University of Delaware
Message-ID <[email protected]>
On 01/28/08 11:00, Aaron Gray wrote:
> "Dan C" <[email protected]> wrote in message 
> news:[email protected]...
>> On Mon, 28 Jan 2008 14:48:19 +0000, Aaron Gray wrote:
>>
>>> I need to print out all instances of the string expression
>>> 'this\-\>[a-zA-Z_]+' from a C++ file on separate lines.
>> OK, go ahead.
> 
> ??? :)
> 
> AFAICT sed will not do this. Tried awk but could not fathom it.
> 
> Aaron
> 
> 

grep 'this->[a-zA-Z]*' file.cc | sed 's/.*\(this->[a-zA-Z]*\).*/\1/g'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.