Replacing tags in braces, even nested tags, with regex

前端 未结 3 1130
感情败类
感情败类 2021-01-26 08:36

Example

preg_replace(\'/\\{[a-zA-Z.,\\(\\)0-9]+\\}/\', \'Replaced\', \'Lorem ipsum dolor sit {tag1({tag2()})}, consectetur adipiscing elit.\');
         


        
3条回答
提交回复
热议问题