Checking if string inside quotes?

Michael Yanowitz m.yanowitz at kearfott.com
Wed May 9 16:39:03 EDT 2007


Hello:

   If I have a long string (such as a Python file).
I search for a sub-string in that string and find it.
Is there a way to determine if that found sub-string is
inside single-quotes or double-quotes or not inside any quotes?
If so how?

Thanks in advance:
Michael Yanowitz




More information about the Python-list mailing list