php preg_replace regex replace string between two string

后端 未结 4 932
余生分开走
余生分开走 2020-12-22 04:28

I have the following problem: I want to replace (in php) a special character, but only if it\'s between two other characters. It tried to find a solution with with preg_repl

4条回答
  •  孤城傲影
    2020-12-22 04:45

    What about string replace?

    str_ireplace(';";', ':";', $orig_string);
    

    asbas;"asd:";asd;asdadasd;"asd;adsas"

提交回复
热议问题