You probably shouldn't be parsing HTML/XHTML/XML with Regex. See: RegEx match open tags except XHTML self-contained tags
I recommend using PHP's SimpleXML parser. The following worked for me:
<?php
$ip = '95.79.1.36'; //russian ip for test
$str = 'http://ipgeobase.ru:7020/geo?ip='.$ip;
$results = simplexml_load_file($str);
$country = $results->ip->country;
$city = $results->ip->city;
if($country == 'RU'){
echo 'City: '.$city.'';
}else{
echo 'Country: '.$country.'';
}
?>