Find first element in list that contains a specific character

Im trying to find in the following string a way to get out the $30K and I would always want the first occurance of a $ (dollar sign) but bring through the full value

text = 'My 82 Benchmark $30K 1000m S7 $23'

text_string = (text.split()) 

Output = ['My', '82', 'Benchmark', '$30K', '1000m', 'S7', '$23']

I have tried this code

for i in text_string: 
    if('$' in i) : 
        print ("Element Exists") 

This seems to know that it exists but not which one it exists in


You can easily get what you want by using re module

import re

To get the first occurrence you can do:

m ='([$][0-9]+K?)', text)

And if you want all occurrences you can do:

re.findall('([$][0-9]+K?)', text)

To get a list with all matches. Hope it helps.