# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"class=\"snapshot__value-current realtime-push\"><span>(\d*,\d*)<span> <span class=\"snapshot__value-unit\">EUR"
test_str = ("\n\n"
"</header><main class=\"page-content\"><nav class=\"breadcrumb margin-top-1.00 margin-top-0.50-lg margin-top-0.00-md margin-horizontal-2.00\"><ul class=\"breadcrumb__list\"><li class=\"breadcrumb__item\"><span class=\"breadcrumb__separator icon icon--arrow-double-right\"></span><a class=\"breadcrumb__text\" href=\"/\" title=\"Home\">Home</a></li><li class=\"breadcrumb__item\"><span class=\"breadcrumb__separator icon icon--arrow-double-right\"></span><a class=\"breadcrumb__text\" href=\"/aktienkurse\" title=\"Aktien\">Aktien</a></li><li class=\"breadcrumb__item\"><span class=\"breadcrumb__separator icon icon--arrow-double-right\"></span><span class=\"breadcrumb__text\" title=\"AURELIUS Aktie\">AURELIUS Aktie</span></li><script type=\"application/ld+json\">{\"@context\": \"http://schema.org\",\"@type\": \"BreadcrumbList\",\"itemListElement\": [{\"@type\": \"ListItem\",\"position\": 1,\"item\": {\"@type\": \"WebPage\",\"@id\": \"/\",\"name\": \"Home\"}},{\"@type\": \"ListItem\",\"position\": 2,\"item\": {\"@type\": \"WebPage\",\"@id\": \"/aktienkurse\",\"name\": \"Aktien\"}},{\"@type\": \"ListItem\",\"position\": 3,\"item\": {\"@type\": \"WebPage\",\"@id\": \"/aktien/aurelius-aktie\",\"name\": \"AURELIUS Aktie\"}}]}</script></ul></nav><section class=\"page-content__container\"><!--CenterColumn_1--><div class=\"page-content__item no-grid-container\"><div class=\"snapshot\"><script>document.addEventListener('DOMContentLoaded', function() {if(isFinnetZeroLoginCookieActive()){document.querySelectorAll('.page-content__container .snapshot').forEach(function(e) {e.classList.add('snapshot--is-zero-user');});}});</script><h1 class=\"snapshot__headline\">AURELIUS Aktie</h1><div class=\"snapshot__depot-actions\"><a class=\"snapshot__depot-add\" href=\"/depot/watchlist.asp?isisin=DE000A0JK2A8&inTyp=1\" title=\"Depot / Watchlist\"><span class=\"icon icon--depot-add\"></span></a></div><div id=\"snapshotTrading\" class=\"snapshot__trading\"><div class=\"snapshot__trading-buy-btn button button--success button--stretch-md\"><span class=\"button__label\">Kaufen</span></div><div class=\"snapshot__trading-sell-btn button button--danger button--stretch-md\"><span class=\"button__label\">Verkaufen</span></div></div><div class=\"snapshot__values\"><span id=\"snapshot-value-fst-current-0\" class=\"snapshot__value-current realtime-push\"><span>22,32</span> <span class=\"snapshot__value-unit\">EUR</span> </span><span id=\"snapshot-value-fst-absolute-0\" class=\"snapshot__value-absolut")
matches = re.finditer(regex, test_str, re.MULTILINE)
for matchNum, match in enumerate(matches, start=1):
print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
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 Python, please visit: https://docs.python.org/3/library/re.html