I have read in product pricing for some products. As you will see below, not every product pricing string is set up the same. What I am trying to do is to parse out the sub-strings I do not want.
Below is the code I have which works, but there has to be a more efficient way to do this.
tmp1 = p_pricing.replace("from ", "")
tmp1 = tmp1.replace("Options Available on Open Box", "")
tmp1 = tmp1.replace("Open Box Price: From ", "")
tmp1 = re.sub(r'\([^)]*\)', '', tmp1)
tmp1 = re.split("[$]", tmp1)
Below is a small sample of my pricing string:
$11.99($6.00 per item)$14.99
from $13.99$18.25
$9.89($4.94 per item)$14.99
from $9.83($3.28 per item)
from $15.99$29.99
from $84.99$104.95
from $9.83($3.28 per item)
$3.47
$94.99$129.99
from $14.34$19.90
from $25.01$65.00Options Available on Open Box