preg replace - How to do preg_replace on a long string -
i want able find , replace long line javascript code. code has lot / , \ in too.
is possible?
you can modify limit manually php allow handle long strings. put following line somewhere before calling preg_replace.
ini_set('pcre.backtrack_limit', 99999999999);
even better, if can modify php.ini file, can change value of pcre.backtrack_limit there new limit globally available.
Comments
Post a Comment