0

我有任务交换顺序块订单,我需要交换订单:

    <!--Validate first group-->
     <lookupGroup name='Get 1st  value '>
        <Properties>
            <select property='A' field='B[0]'/>
        </Properties>
    </lookupGroup>
    <Include>..\Value\Test1.xml</Include>
    <Include>..\Value\Test2.xml</Include>
    <Include>..\Value\Test3.xml</Include>
    <Include>..\Value\Test4.xml</Include>

所以上面写的需要倒序:

    <Include>..\Value\Test2.xml</Include>
    <Include>..\Value\Test3.xml</Include>
    <Include>..\Value\Test4.xml</Include>

    <!--Validate first group-->
     <lookupGroup name='Get 1st  value '>
        <Properties>
            <select property='A' field='B[0]'/>
        </Properties>
    </lookupGroup>
    <Include>..\Value\Test1.xml</Include>

它的正确语法是什么?任何帮助,将不胜感激。先感谢您。

4

1 回答 1

0

此正则表达式适用于您的示例数据,并且每次您点击替换时,都会一次将包含元素移动到 lookupGroup 上方。希望这可以帮助。

找什么:( *<lookupGroup.*lookupGroup>.*\n)([^\n]*<Include>.*<.Include>)\n?

用。。。来代替:\2\n\1

为此,您必须拥有“。” 设置为匹配换行符。

于 2013-04-24T22:41:13.000 回答