i'm new to python world and i'm trying to extract value from text. I try to find the keyword by re.search('keyword') , but I want to get the value after keyword
text = word1:1434, word2:4446, word3:7171
i just want to get the value of word1
i try
keyword = 'word1'
before_keyword, keyword, after_keyword = text.partition(keyword)
print(after_keyword)
output
:1434, word2:4446, word3:7171
i just want to get the value of word1 (1434)