title: how to make index job to the location of the next value?
body: <p>I'm trying to make a code to rename pdf based on the content and the content have 3 or 4 amount which look like this and many other number "Bank Statement" on 1st page it looks like that: </p>
  
  <pre><code>-Account number/// Beginning balance///Total credits///Total debits///////Ending balance
  2120033689/////////$226,913.35 ////////$310.00/////////////////-$300.00////////$226,923.35
  </code></pre>
  
  <p>What I'm trying to get is the number after the second $ ($310.00) or the 3rd $ (-$300) and also if you guys can tell me how to make the program determine the pattern in the text and pull it out, like for the account number 
  it's all number and it consists of 10 number, is there is a way that this can be done?</p>
  
  <p>My Code:</p>
  
  <pre><code>import  PyPDF2
  fullpath = file path
  pdfFileObj = open(fullpath, 'rb')
  pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
  pdfReader.numPages
  pageObj = pdfReader.getPage(0)
  content = pageObj.extractText()
  beginloc = content.index("$")
  beginingbalance = content[beginloc:beginloc+9]
  </code></pre>
  
  <p>My question is if there is a way to make my program get the second $ sign and the number after it and if there is a way to make it pick some kind of a pattern to get the bank account number?</p>