title: copy required data from one file to another file in python
body: <p>I am new to Python and am stuck at this I have a file <code>a.txt</code> which contains 10-15 lines of html code and text. I want to copy data which matches my regular expression from one <code>a.txt</code> to <code>b.txt</code>. Suppose i have a line <code>Hello "World" How "are" you</code> and I want to copy data which is between double quotes i.e. <code>World</code> and <code>are</code> to be copied to new file.</p>
  
  <p>This is what i have done.</p>
  
  <pre><code>if x in line:
    p = re.compile("\"*\"")
    q = p.findall(line)
    print q
  </code></pre>
  
  <p>But this is just displaying only " "(double quotes) as output. I think there is a mistake in my regular expression.
  any help is greatly appreciated.
  Thanks.</p>