I've a log file which has content like below. I'm trying to extract xml segmentation which matches with few itemnumber let's say 6654721, 6654722 and 6654725. the expected output is the complete xml segmentation with matches with those three itemnumber. I tried with regular expression (<Record>.*? </Record>)
which exactly find the each xml segmentation then I tried to apply filter like (<Record>.*?(6654721|6654722|6654725).*?</Record>)
but this is not working as expected. can you someone help me to address this? thanks for your response in advanace.
2017-04-20 some log file
2017-04-20 some log file
2017-04-20 some log file
<Record>
<itemname>Lego Fire Rescue</itemname>
<itemnumber>6654721</itemnumber>
<availableinv>19</availableinv>
<ageplus>3</ageplus>
<storeId>19</storeId>
</Record>
2017-04-20 some log file
2017-04-20 some log file
2017-04-20 some log file
<Record>
<itemname>Lego Fire Rescue</itemname>
<itemnumber>6654722</itemnumber>
<availableinv>19</availableinv>
<ageplus>3</ageplus>
<storeId>19</storeId>
</Record>
2017-04-20 some log file
2017-04-20 some log file
2017-04-20 some log file
<Record>
<itemname>Lego Fire Rescue</itemname>
<itemnumber>6654723</itemnumber>
<availableinv>19</availableinv>
<ageplus>3</ageplus>
<storeId>19</storeId>
</Record>
2017-04-20 some log file
2017-04-20 some log file
2017-04-20 some log file
<Record>
<itemname>Lego Fire Rescue</itemname>
<itemnumber>6654725</itemnumber>
<availableinv>19</availableinv>
<ageplus>3</ageplus>
<storeId>19</storeId>
</Record>