How can we get to the end of a quote inside a string

rajmohan.h at gmail.com rajmohan.h at gmail.com
Sun Aug 31 16:29:26 CEST 2008


Hi all,
    Suppose I have a string which contains quotes inside quotes -
single and double quotes interchangeably -
 s = "a1' b1 " c1' d1 ' c2" b2 'a2"
     I need to start at b1 and end at b2 - i.e. I have to parse the
single quote strings from inside s.

     Is there an existing string quote parser which I can use or
should I write a parser myself?

     If somebody could help me on this I would be much obliged.

Regards
kR/\/



More information about the Python-list mailing list