title: Python regex findall to read line in .csv file
body: <p>I have a .csv file (or could happily be a .txt file) with some records in it:</p>
  
  <pre><code>JB74XYZ Kerry   Katona  44  Mansion_House   LV10YFB
  WL67IAM William Iam 34  The_Voice_Street    LN44HJU
  </code></pre>
  
  <p>etc etc</p>
  
  <p>I have used python to open and read the file, then regex findall (and attempted a similar regex rule) to identify a match:</p>
  
  <pre><code>import re
  from re import findall
  
  reg = "JB74XYZ"
  
  with open("RegDD.txt","r")as file:
      data=file.read()
      search=findall(reg,data)
  
  print (search)
  </code></pre>
  
  <p>which gives the resulting output:</p>
  
  <pre><code>['JB74XYZ']
  </code></pre>
  
  <p>I have tested this out, and it seems I have the regex findall working, in that it is correctly identifying a 'match' and returning it.</p>
  
  <ol>
  <li>My question is, how do I get the remaining content of the 'matched' lines to be returned as well? (eventually I will get this written into a new file, but for now I just want to have the matching line printed).</li>
  </ol>
  
  <p>I have explored python dictionaries as one way of indexing things, but I hit a wall and got no further than the regex returning a positive result.</p>
  
  <ol start="2">
  <li>I guess from this a second question might be: am I choosing the wrong approach altogether?</li>
  </ol>
  
  <p>I hope I have been specific enough, first question here, and I have spent hours (not minutes) looking for specific solutions, and trying out a few ideas.
  I'm guessing that this is not an especially tricky concept, but I could do with a few hints if possible.</p>