How can I take the number (20 in the following example) in this string?
string = """<option value="full_review">Detailed review (Up to $20.00)</option>"""
I used
detailint = re.findall("""value="full_review">Detailed review (Up to $(.*))</option>""", bidsrc)
But it doesn’t return me a sweat! Any tricks?
Assuming
bidsrc = string, you need to escape both the$and the()since they have a special meaning to the regex compiler. You’ll also want to use.*?, or better[\d.]+, to match the actual amount.