From
string= this is, not good "type of ,question" to ask, on stackoverflow
I want to extract "type of , question" substring and replace ',' with ' '.
with re.findall() it yields a list of characters between " " and with re.search it yields class object.
With re.sub() it replaces all ',' but I need them except the ones that are inside sub-string with double quotes.
Can anyone help me with this problem.
Thanks in advance!!
re.findall,re.search, andre.sub, yes? Please share the code for each of those attempts.'string= this is, not good "type of ,question" to ask, on stackoverflow'orstring = 'this is, not good "type of ,question" to ask, on stackoverflow'?result = 'this is, not good "type of question" to ask, on stackoverflow'. If you're thinking "very funny, I actually need it to work on a variety of inputs", then that's exactly why I'm asking these clarifying questions :-)