我在一个xml文件中有以下标记
&\hbox{(1b)}}$$ with the initial condition <2inline-formula>$x(0)$, where the subscript <3inline-formula>$p$ means 'plant’; <4inline-formula>$x_{p}(t) \in \Re^{n}$ is the state, <5inline-formula>$y_{p}(t)\in\Re^{q}$ is the output, and <6inline-formula>$u_{p}(t)\in\Re^{m}$ is the input; <7inline-formula>
我想将所有以数字开头的内联公式替换为<inline-formula>
,但我无法给出搜索以数字开头的内联公式的条件,因此对此有任何帮助。。提前谢谢
必须使用正则表达式(
re
模块)来检测“inline formula”(\d+inline-formula
)前面的一个或多个数字。你知道吗例如:
相关问题 更多 >
编程相关推荐