PHP正则表达式用等号运算符替换新行


PHP regular expression to replace new line with equal operator

我想将后面跟换行符的equal运算符中的字符串替换为空格。

From String:-
 Dr/CR,Entry Amount,Value date,Product,Party Code,Party Name,Virtual='nAccount Number,Locations,RemittingBank,UTR No'nC,500000.0000,30-Mar-15,ABC,XYZ,QWER ='nLTD,LKJH,
To String:- 
 Dr/CR,Entry Amount,Value date,Product,Party Code,Party Name,Virtual Account   Number,Locations,RemittingBank,UTR No'nC,500000.0000,30-Mar-15,ABC,XYZ,QWER  LTD,LKJH,

您可以使用preg_replace。

preg_replace('~='n~', " ", $str);