resultsblock

<resultsblock> 元素定義系統要如何處理從相關 <execute> 元素執行之指令行的結果。<resultsblock> 元素僅用在 <command> 元素中。可對 <resultsblock> 元素建立巢狀,以放置於分割區結果內。

<resultsblock> 元素可以有選用的開始型樣和結尾型樣屬性,這兩個屬性使用 Perl 正規表示式來定義要處理之輸出行的範圍。然後,您可以使用不同的 <resultsblock> 元素來處理不同範圍。下列虛擬碼顯示 <resultsblock> 元素的結構。
<resultsblock startpattern="" endpattern="" >
        <match>
        <bom>
         <field/>
        </bom>
        <adduser/>
        <setenv/>
        <run/> (The <run> element can be used to run commands within other commands)
        </match>
        <setenv/>
      </resultsblock>
下例顯示 <resultsblock>、<match> 和 <bom> 元素搭配使用的方式:
<resultsblock 
beginpattern="^Change (\d+) by (.*?)@(.*?) on (.*?) (.*?)$" 
endpattern="^Differences ...$">
        <match pattern="(?=^(?:(?!Differences ...).)*$).?">
        <bom category="Detail" section="descriptions">
        <field name="Description" text="$_"/>
        </bom>
        </match>
     </resultsblock>

意見