I have a problem to find a string/float inside a string after serveral metacharacters with Python. I watched videos and read a lot of explanations, but for my special case I didn't find a solution, maybe you can help. I have a string with backslashs and asterisk and I want JUST the float after the string "Score" - how can I get it?
text = str("texttexttext\n*Score* 2,567 texttexttext")
y = re.findall("\\n*Score*(.+)", text)
print(y)
Output: ['* 2,567 texttexttext']
# I want JUST the Output "2,567"
Other Question: How can I get JUST the text before "\nScore"?
z = re.findall("^(.+)\\n*Score*", text)
print(z)
#no Output
Thanks for helping me!