Python: Regex to match multiline strings in C code
<p>I'm attempting to match multiline strings in C code via the <code>re</code> module.</p>

<p>I'd like to match strings of the form:</p>

<pre><code>char * theString = "Some string \
                   I want to match.";
</code></pre>

<p>I tried the following regex, which does not work:</p>

<pre><code>regex = re.compile(r"\".*\"$", re.MULTILINE)
</code></pre>

<p>I thought that it would match the first ", then continue searching the next line until it found a closing ", but this is not the case.  Is this because $ requires that there be a " at the end of the line to match?  Is there some way to do this using regex?</p>