我有一个大字符串,其中有多个数学。想把它们全部取出一个字符串数组。使用正则表达式找到它们。但是正则表达式中缺少一些东西,所以它没有给出任何输出。
MathMls 的正则表达式是什么?
示例字符串
查找«math xmlns=\"http://www.w3.org/1998/Math/MathML\"»«mroot»«mrow»«mi»#«/mi»«mi»a«/mi»«的总和/mrow»«mn»3«/mn»«/mroot»«mo»=«/mo»«mroot»«mrow»«mi»#«/mi»«mi»b«/mi»«/mrow»« mn»3«/mn»«/mroot»«/math» 和 «math xmlns=\"http://www.w3.org/1998/Math/MathML\"»«mo»=«/mo»«msup »«mfenced»«mrow»«mi»#«/mi»«mi»b«/mi»«/mrow»«/mfenced»«mfrac»«mn»1«/mn»«mn»3«/mn» «/mfrac»«/msup»«/math»
从中得到 2 个 mathmls