Urmil Shah wrote: > > I am trying to replace value after say Treal; -200mV; with just Treal; in > the below string > > Strings in a File: > -------------------------- > {3504} V125_out_V_5ma_LFL := Treal; V125_out_V_5ma_UFL := > Treal; > {$3505} V125_out_Impedance_UFL := Treal; > { 4130} Filter_offset_11M_LFL := Treal; -200mV; Filter_offset_11M_UFL > := Treal; 200mV; > {5000000} FE_Ofst_DVD_1v_06_05L_LFL := Treal; -180mV; > > so the final output should be > { 4130} Filter_offset_11M_LFL := Treal; Filter_offset_11M_UFL := > Treal; > > $str =~s/\s+\bTreal\b\;(\d+\w+)\;/Treal;/g > > but not working..any idea
This might work (not tested): $str =~ s/(?<= := Treal;) [+-]?\d+mV;//g John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]