title: Match the pattern and print next line
body: <p>I have a text file that contains certain rules. Here is format for it:          </p>
  
  <pre><code>:SchoolName (rule_1)
  )
  :xyz (true)
  :abc_efg (
      : xxyyzz-x1y1-z1z2-z3z4
  )
  </code></pre>
  
  <ol>
  <li>I want to match for ':abc_efg' and get line after the match i.e.
  ': xxyyzz-x1y1-z1z2-z3z4'</li>
  <li>Everytime there is a new file it would look for ':abc_efg' and get corresponding line after the match</li>
  </ol>
  
  <p>So far I have tried</p>
  
  <pre><code>with open('G:\CM\Python Exercises\Project_F\abc.txt') as f:
      text = f.read()
      list1=text.strip('\n\t').split(':')
      print list1
      for line in list1:
          if ':abc_efg' in list1:
              print line
              print '\n'.join(list1[i+1])
  </code></pre>
  
  <p>print list1 shows</p>
  
  <pre><code>[':abc_efg (\n\t\t\t', ': xxyyzz-x1y1-z1z2-z3z4 \n\t\t)\n\t\t']
  </code></pre>