title: Regex for matching quotes and single quotes
body: <p>I'm currently writing a parser for ColdFusion code. I'm using a regex (in c#) to extract the name datasource attribute of the cfquery tag.</p>
  
  <p>For the time being the regex is the following
      <code>&lt;cfquery\s.*datasource\s*=\s*(?:'|")(.*)(?:'|")</code></p>
  
  <p>it works well for strings like
      <code>&lt;cfquery datasource="myDS"</code>
  or
      <code>&lt;cfquery datasource='myDS'</code></p>
  
  <p>But it gets crazy when parsing strings like
      <code>&lt;cfquery datasource="#GetSourceName('myDS')#"</code></p>
  
  <p>Obviously the part of the regex (?:'|") is the cause. Is there a way to only match single quote when the first match was a single quote? And only match the double quote when the first match was a double quote?</p>
  
  <p>Thanks in advance!</p>