[Solved] Python get info from long complicated string


You can use re module for the task:

style="fill: rgb(0, 0, 0); fill-opacity: 1; font-family: ProjectStocksFont; font-size: 70px; font-weight: normal; font-style: normal; text-decoration: none;"

import re

print( re.search(r'font-size:\s*(\d+)', style)[1] )

Prints:

70

3

solved Python get info from long complicated string