Thanks
116@434 for the reply. I tested your script.
I just run it, but no luck; :-(( only contact_name is getting replaced with XXX
the search should be case insensitive.Sending you the files i tested.
File1 (its a multi-line file) which needs to be replced-
11-07-01 07:06:59.929 | Createfile:Name='Hiano',Name_ddr1='Honkong bbc',Name_ddr2='Soifoi', Name_ddr1='Japan' This is example.
11-07-01 07:06:59.928 | After Execute my contact_name='Hiano' and I have ssn_no='12253876'
11-07-01 07:06:59.928 | This string needs to be repalces Hiano and 12253876 and Soifoi
File2 (contains stngs to be srch/replced):
Name
Name_ddr1
Name_ddr2
contact_name
File3 (intermediate file) produced is-
s/\(Name
=\)'[^']*'/\1XXX/g
s/\(Name_ddr1
=\)'[^']*'/\1XXX/g
s/\(Name_ddr2
=\)'[^']*'/\1XXX/g
s/\(ssn_no
=\)'[^']*'/\1XXX/g
s/\(contact_name=\)'[^']*'/\1XXX/g
Nothing is getting replaced in the Expected_file except contact_name!!
pls help!!
I need the final output in the expected file as below:
11-07-01 07:06:59.929 | Createfile:Name=XXX,Name_ddr1=XXX,Name_ddr2=XXX, Name_ddr1=XXX This is example.
11-07-01 07:06:59.928 | After Execute my contact_name=XXX and I have ssn_no=XXX
11-07-01 07:06:59.928 | This string needs to be repalces XXX and XXX and XXX
Pls hhave a look.
thanks