I'm having a file in which there are lines containing some patterns as
`XX3 DB3 DBB1 VDD VSS VSSS VDDS inverter params: ln=.045u wn=0.5 mm=mm'
`XX4 DBB1 DB3 VDD VSS VSSS VDDS inverter params: ln=.045u wn=.12u
`XX14 DBB1 DB_TBY VDD VSS VSSS VDDS inverter params: Mpar =(Something))
I need to replace these lines as
`XX3 DB3 DBB1 VDD VSS VSSS VDDS inverter
`XX4 DBB1 DB3 VDD VSS VSSS VDDS inverter
`XX14 DBB1 DB_TBY VDD VSS VSSS VDDS inverter
that is I want to delete everything after params, It can be anything, till the newline.
foreach(@lines){
$_ =~ s/params: .*?[a-z,A-Z,),0-9,mm,m]'/ /g;}
But here everything is deleting but it should end with ' . As I have no idea about what all patterns can be present , this technique is not possible.