read a multiline string in python
<p>I need to parse a string and read a particular substring from it. The string I need to parse is as follows :</p>

<pre><code>domain
(
    (device
          (console
               (xxxxxx)
               (XXXXXX)
          )
    )
)

domain
(
    (device
          (vfb
               (xxxxxx)
               (location : 5903)
          )
    )
)
</code></pre>

<p>This is just a sample string. The actual string might contain many such substrings.
I need to get the value of location field just from the "vfb" substring. I tried the findall and search functions as follows</p>

<pre><code>import re
text=re.search('(device(vfb(.*?)))',stringname)
</code></pre>

<p>and</p>

<pre><code>import re
text=re.findall('(device(vfb(.*?)))',stringname,re.DOTALL)
</code></pre>

<p>But I am getting empty string always.
Is there a easy way to do this ? Thanks</p>
