$re = '/<NewMarket sysname="SOCCER(.*?)ODD_EVEN/m';
$str = '<NewMarket sysname="SOCCER_CORNERS_FIRST_HALF_DOUBLE_CHANCE" name="1st Half Corners Double Chance" voidRule="false" settleRule="[Period] >= [HT]">
<Mappings>
<OldMarket sysname="SOCCER_CORNERS_HALFTIME_DOUBLE_CHANCE" />
</Mappings>
<MarketDefinition captionEn="1st Half Corners Double Chance" captionEl="Διπλή Ευκαιρία Κόρνερ Ημιχρόνου">
<Odds>
<Bet code="1X" name="HomeDraw" captionEn="{HomeTeam} / Draw" settleRule="[HomeCorners1H] >= [AwayCorners1H]" />
<Bet code="X2" name="DrawAway" captionEn="{AwayTeam} / Draw" settleRule="[HomeCorners1H] <= [AwayCorners1H]" />
<Bet code="12" name="HomeAway" captionEn="{HomeTeam} / {AwayTeam}" settleRule="[HomeCorners1H] > [AwayCorners1H] || [HomeCorners1H] < [AwayCorners1H]" />
</Odds>
</MarketDefinition>
</NewMarket>
<NewMarket sysname="SOCCER_CORNERS_ODD_EVEN" name="Corners Odd/Even" voidRule="false" settleRule="[Period] >= [FT]">
<Mappings>
<OldMarket sysname="SOCCER_CORNERS_ODD_EVEN" />
</Mappings>
<MarketDefinition captionEn="Match Corners Odd/Even" captionEl="Μονά Ή Ζυγά Κόρνερ Αγώνα">
<Odds>
<Bet code="1" name="Odd" captionEn="Odd" settleRule="([TotalCorners] % 2) = 1" />
<Bet code="0" name="Even" captionEn="Even" settleRule="([TotalCorners] % 2) = 0" />
</Odds>
</MarketDefinition>
</NewMarket>
<NewMarket sysname="SOCCER_CORNERS_FIRST_HALF_ODD_EVEN" name="1st Half Corners Odd/Even" voidRule="false" settleRule="[Period] >= [HT]">
<Mappings>
<OldMarket sysname="SOCCER_CORNERS_FIRST_HALF_ODD_EVEN" />
</Mappings>
<MarketDefinition captionEn="1st Half Odd/Even Corners" captionEl="Μονά Ή Ζυγά Κόρνερ 1ου Ημιχρόνου">
<Odds>
<Bet code="1" name="Odd" captionEn="Odd" settleRule="([TotalCorners1H] % 2) = 1" />
<Bet code="0" name="Even" captionEn="Even" settleRule="([TotalCorners1H] % 2) = 0" />
</Odds>
</MarketDefinition>
</NewMarket>
<NewMarket sysname="SOCCER_CORNERS_SECOND_HALF_ODD_EVEN" name="2nd Half Corners Odd/Even" voidRule="false" settleRule="[Period] >= [FT]">
<Mappings>
<OldMarket sysname="SOCCER_CORNERS_SECOND_HALF_ODD_EVEN" />
</Mappings>
<MarketDefinition captionEn="2nd Half Odd/Even Corners" captionEl="Μονά Ή Ζυγά Κόρνερ 2ου Ημιχρόνου">
<Odds>
<Bet code="1" name="Odd" captionEn="Odd" settleRule="([TotalCorners2H] % 2) = 1" />
<Bet code="0" name="Even" captionEn="Even" settleRule="([TotalCorners2H] % 2) = 0" />
</Odds>
</MarketDefinition>
</NewMarket>
<NewMarket sysname="SOCCER_CORNERS_RESULT_NO_DRAW" name="Corners Draw No Bet" voidRule="[Period] >= [FT] && [HomeCorners] = [AwayCorners]" settleRule="[Period] >= [FT] && [HomeCorners] != [AwayCorners]">
<Mappings>
<OldMarket sysname="SOCCER_CORNERS_RESULT_NO_DRAW" />
</Mappings>
<MarketDefinition captionEn="Match Corners Draw no bet" captionEl="Νικητής Κόρνερ Αγώνα Ισοπαλία ΄Οχι Στοίχημα">
<Odds>
<Bet code="1" name="Home" captionEn="{HomeTeam}" settleRule="[HomeCorners] > [AwayCorners]" />
<Bet code="2" name="Away" captionEn="{AwayTeam}" settleRule="[HomeCorners] < [AwayCorners]" />
</Odds>
</MarketDefinition>
</NewMarket>';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php