title: Regex to determine if a string is a name of a range or a cell's address
body: <p>I'm struggling to come up with a regular expression pattern that can help me determine if a string is a cell's address or if it is a cell's name.</p>
  
  <p>Here are some examples of cell addresses:</p>
  
  <ul>
  <li>"E5"</li>
  <li>"AA55:E5"</li>
  <li>"DD5555:DDD55555, E5, F5:AA55"</li>
  <li>"$F7:$G$7"</li>
  </ul>
  
  <p>Here are some examples of cell names:</p>
  
  <ul>
  <li>"bis_document_id"</li>
  <li>"PCR1MM_YPCVolume"</li>
  <li>"sheet_error7"</li>
  <li>"blahE5"</li>
  <li>"training_A1"</li>
  <li>"myNameIsGeorgeJR"</li>
  </ul>
  
  <h2>Is there a regex pattern you guys can come up with that will match all of either group and none of the other?</h2>
  
  <p>I have been able to think of a couple of ways to determine what a string is not:</p>
  
  <ul>
  <li>If it has any other character than "$" or ":" in it, I know it is not a cell's name and is most likely a cell's address.</li>
  <li>If it has more than three consecutive numbers, it is most likely not a cell's address.</li>
  <li>A cell's address is extremely unlikely to have more than 2 letters preceding a number, 99.9% of the cell addresses will be in columns A to ZZ.</li>
  </ul>
  
  <p>Alas, these three small tests can hardly prove what this string is.</p>
  
  <p>Thanks for the help!</p>