title: Regular expression to return full file name and path
body: <p>I'm a bit rusty when it comes to regular expressions so I could really use some expert help for the syntax.  I'm looking for a regular expression that will <strong>return the full file name and path</strong> from a string.  I am using the reference "Microsoft VBScript Regular Expressions 5.5" for Excel 2010 VBA.  I just need the regex string.</p>
  
  <p>Here's an example of what I'm working on.  If the string is</p>
  
  <blockquote>
    <p>=VLOOKUP($X18, 'E:\BUDGET 2012-13\Round 2 - final\program worksheets[AD allocations Support 2012 R2.xlsx]2013'!costcenter,
    Y$5+2, FALSE)</p>
  </blockquote>
  
  <p>then the returned value would be</p>
  
  <blockquote>
    <p>'E:\BUDGET 2012-13\Round 2 - final\program worksheets[AD allocations
    Support 2012 R2.xlsx]2013'</p>
  </blockquote>
  
  <p>OR</p>
  
  <blockquote>
    <p>'E:\BUDGET 2012-13\Round 2 - final\program worksheets[AD allocations
    Support 2012 R2.xlsx]</p>
  </blockquote>
  
  <p>( I can code around either return value ).
  Thank you!</p>
  
  <p><strong>-- DOH! --</strong></p>
  
  <p>I figured it out a few minutes ago.  Being a newb I can't answer my own question so I'm doing it here -- some of the rules here are odd...anyway...  The syntax is </p>
  
  <blockquote>
    <p>'.+?'</p>
  </blockquote>
  
  <p>and will return</p>
  
  <blockquote>
    <p>'E:\BUDGET 2012-13\Round 2 - final\program worksheets[AD allocations
    Support 2012 R2.xlsx]2013'</p>
  </blockquote>
  
  <p><em>If you know of a better way please feel free to post it.</em></p>