本文介绍了在创建xPath时需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好 以下是我运行命令后得到的输出
Hi all below is the output i am getting after running a command
<output> <line index="1">system:!:0:root,appdet</line></output>我只想从行数据中提取"root,appdet". 请告诉我怎么做.. 谢谢
I want to extract only "root,appdet" from the line data. Please tell me how to do this.. Thank you
推荐答案您可以使用正则表达式解决此问题. 请参见 XQuery和XPath正则表达式 [ ^ ] 具体查看 You can use a regular expression to solve this problem. See XQuery and XPath Regular Expressions[^] Specifically look into fn:tokenize(subject, pattern, flags)
这种情况下的正则表达式可以是
The regex in this case could be
:(?<data>[a-z]+,[a-z]+)注意:此正则表达式仅在您提出问题的特定情况下有效.
Note: This regex will only work under the specific circumstances you have given in your question.
更多推荐
在创建xPath时需要帮助
发布评论