Perepelenok,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
p {
border: #FF0000 1px solid;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
var obj = {};
$("[data-year]").each(function() {
var el = $(this),
year = $(this).data("year"),
p = obj[year];
if (p) el.appendTo(p);
else obj[year] = el.wrap("<p/>").parent()
})
});
</script>
</head>
<body>
<span data-year="2018">
<a href="https:/url.com">
2018
|
<strong>Название</strong>
/
Москва, Россия
<br>
</a>
</span>
<span data-year="2018">
<a href="https:/url.com">
2018
|
<strong>Название</strong>
/
Санкт-Петербург, Россия
<br>
</a>
</span>
<span data-year="2017">
<a href="https:/url.com">
2017
|
<strong>Название</strong>
/
Москва, Россия
<br>
</a>
</span>
</body>
</html>