title: Wildcard in the middle of an expression?
body: <p>I try to load files in different categories according to theis file name. Till now I always used </p>
  
  <pre><code>list&lt;-dir(pattern=".gle$") 
  </code></pre>
  
  <p>to get all gle-files. Now I want to load the populations bg, campo &amp; pca seperately and I am searching for a wildcard which can be used in the middle of filenames, which are e.g.</p>
  
  <pre><code>0KK_bg_SunAdj.gle
  0LC_campo_SunAdj.gle
  0KR_pca_SunAdj_corr.gle
  </code></pre>
  
  <p>I thought of something like</p>
  
  <pre><code>list&lt;-dir(pattern=glob2rx("*something*bg*something*.gle$"))
  </code></pre>
  
  <p>but I tried all the examples in the <code>?glob2rx</code> help file and did not succeed.
  I'm sure it is possible (I mean; it's R...) but i cannot figure it out...</p>
  
  <p>Thanks!</p>