import re
regex = r"^currency=(\S+)(?:\n.*)*?\n\[@(\d+)"
s = ("[Namex]\n"
"Name=jsdjsk\n"
"value=dfdfdf\n"
"currency=dollor\n"
"market=sfdsf\n"
"endvalue=xyz\n"
"[@1234#feagbdvsdf]\n"
"[Namey]\n"
"Name=jsdjsk\n"
"value=dfdfdf\n"
"currency=\n"
"endvalue=xyz\n"
"[@5777#feagbdvsdf]\n"
"[Namez]\n"
"Name=jsdjsk\n"
"currency=euro\n"
"market=sfdsf\n"
"[@98766#feagbdvsdf]")
print(re.findall(regex, s, re.MULTILINE))
aW1wb3J0IHJlCgpyZWdleCA9IHIiXmN1cnJlbmN5PShcUyspKD86XG4uKikqP1xuXFtAKFxkKykiCgpzID0gKCJbTmFtZXhdXG4iCgkiTmFtZT1qc2Rqc2tcbiIKCSJ2YWx1ZT1kZmRmZGZcbiIKCSJjdXJyZW5jeT1kb2xsb3JcbiIKCSJtYXJrZXQ9c2Zkc2ZcbiIKCSJlbmR2YWx1ZT14eXpcbiIKCSJbQDEyMzQjZmVhZ2JkdnNkZl1cbiIKCSJbTmFtZXldXG4iCgkiTmFtZT1qc2Rqc2tcbiIKCSJ2YWx1ZT1kZmRmZGZcbiIKCSJjdXJyZW5jeT1cbiIKCSJlbmR2YWx1ZT14eXpcbiIKCSJbQDU3NzcjZmVhZ2JkdnNkZl1cbiIKCSJbTmFtZXpdXG4iCgkiTmFtZT1qc2Rqc2tcbiIKCSJjdXJyZW5jeT1ldXJvXG4iCgkibWFya2V0PXNmZHNmXG4iCgkiW0A5ODc2NiNmZWFnYmR2c2RmXSIpCgkKcHJpbnQocmUuZmluZGFsbChyZWdleCwgcywgcmUuTVVMVElMSU5FKSk=