小编mac*_*mac的帖子

将$ x <y $替换为$ x <y $

我想在文本中搜索<美元符号之间的少于符号$x<y$并替换它$x < y$.

我使用的是mathjax,而不是sign会导致渲染Mathjax时遇到一些问题.(参见http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents).

我尝试过, $text = preg_replace("/\$(.*?)(<)(.*?)\$/","/\$$1 < $3\$/",$text)但我不确定这是否是一个很好的解决方案.我是编程新手:)

谢谢您的帮助.

php regex

5
推荐指数
1
解决办法
121
查看次数

标签 统计

php ×1

regex ×1