I have a file that contains this:
<Row>
<Cell><Data ss:Type="String">INC000012486615</Data></Cell>
<Cell><Data ss:Type="String">abcd-efg-hij4-en:ddcs</Data></Cell>
<Cell><Data ss:Type="String">fs-hubraum-apps:kayw-de</Data></Cell>
<Cell><Data ss:Type="String">mn-def-seb01:sfyc-en</Data></Cell>
<Cell><Data ss:Type="String">00055s4dEN</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">General Information</Data></Cell>
<Cell ss:StyleID="ce2"><Data ss:Type="DateTime">2017-06-28T16:24:35</Data>
</Cell><Cell><Data ss:Type="String">Public</Data></Cell>
<Cell><Data ss:Type="String">Hi John,
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Thanks,
Snow</Data></Cell>
</Row>
I wrote a Regex that selects the valuable information: (?<=<Data[^>]*>)((.|\n)*?)(?=<\/Data>)
: only selects the data inside inside <Cell><Data>
. You can test on this link
I would like to be able to select the nth match using Regex: (1st match: INC000012486615
, second match abcd-efg-hij4-en:ddcs
, etc.)
I wasn't successful modifying my Regex. Any suggestions ?
PS: I have to use Regex. For Splunk Field extraction.