title: Using a regex expression from property file in a Mule SFTP file connector
body: <p>I have a flow that gets SFTP files filtered by a regex expression. I utilize many of the settings of the SFTP connector using property files. The one setting I have been unable to do this with is the regex pattern attribute inside the <em>file:filename-regex-filter</em> element.</p>
  
  <p>This is my what I have for the SFTP connector.</p>
  
  <pre><code>        &lt;!-- Get the HiTrack files via SFTP --&gt;
          &lt;sftp:inbound-endpoint name="HiTrackInboundSFTPEndpoint"
              doc:name="Get SFTP"
              user="${sftp.origin.user}"
              password="${sftp.origin.password}"
              port="${sftp.origin.port}"
              path="${sftp.origin.path}"
              host="${sftp.origin.host}"
              pollingFrequency="${sftp.origin.pollingFrequency}"
              fileAge="${sftp.origin.fileAge}"
              responseTimeout="${sftp.origin.responseTimeout}"
              tempDir="${sftp.origin.tempDir}" 
              archiveDir="${local.archive.directory}" 
              archiveTempReceivingDir="${local.archive.receiveDir}" 
              archiveTempSendingDir="${local.archive.sendingDir}" 
              useTempFileTimestampSuffix="true"&gt;
  
              &lt;!-- Use RegEx filter to filter only HiTrack files with within the proper date format YYYYMMdd
                   Range of dates are from 19000101 to 20991231 --&gt;
              &lt;file:filename-regex-filter
                  pattern="hitrack_(19|20)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])_(.*).xml"
                  caseSensitive="false" /&gt;
          &lt;/sftp:inbound-endpoint&gt;
  </code></pre>
  
  <p>I have tried both of the following for the pattern attribute with no success.</p>
  
  <pre><code>pattern="#[${regex.filter}]"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>pattern="${regex.filter}"
  </code></pre>
  
  <p>My property files contain the values for all those listed and works great except for the regex filter pattern.</p>
  
  <p>The property file for regex.filter is as follows:</p>
  
  <pre><code>regex.filter=hitrack_(19|20)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])_(.*).xml
  </code></pre>
  
  <p>I do not get any errors; it just does not pass any valid files through when using the property expression. It only works when using the regex expression explicitly.</p>
  
  <p>I would appreciate any suggestions or better, solutions, to this issue.</p>