Search and Replace with perl

S

Subra

Hi,

I have a file with entries like

=======================================
_RWSTD_VALUE_ALLOC(test1,
test5);
_RWSTD_VALUE_ALLOC(test1,snm);
_RWSTD_VALUE_ALLOC(xyz,
789);
_RWSTD_VALUE_ALLOC(test1,sbk);
_RWSTD_VALUE_ALLOC(abc,
123);

:
===============================

I want to put 2nd argument to _RWSTD_VALUE_ALLOC as *this .
So my resultant file should be
=======================================
_RWSTD_VALUE_ALLOC(test1,*this,
test5);
_RWSTD_VALUE_ALLOC(test1,snm);
_RWSTD_VALUE_ALLOC(xyz,*this,
789);
_RWSTD_VALUE_ALLOC(test1,sbk);
_RWSTD_VALUE_ALLOC(abc,*this,
123);

:
===============================

Please help me to write this script....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top