title: Python - how to pull an address from a string or how to get the word before something thats on a different line?
body: <p>my sample content is below</p>
  
  <pre><code>content ="""
  Dear Customer,
  
   Detail of service affected: 
  
   Bobs Builders
   Retail park 
   The Aavenue
   London
   LDN 4DX
  
  
   Start Time &amp; Date: 04/01/2017 00:05 
   Completion Time &amp; Date: 04/01/2017 06:00 
  
   Details of Work: 
   ....
  </code></pre>
  
  <p>Im already pulling out the postcode with</p>
  
  <pre><code>postcodes =  re.findall(r"[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][A-Z]{2}", content)
  </code></pre>
  
  <p>I would also like to get the City from this content, is that even possible? would i have to provide it with a list of Citys first? and then check against that?</p>
  
  <p>or is there a way of getting the line before the postcode? as the addresses are always sent that way.</p>
  
  <p>could i use the postcodes regex to get the word before the postcode?</p>
  
  <p>Thanks</p>