title: Using brace expansion in if statement
body: <p>Let's say I've got a list with file names in it with date. I want to do something on files with extension <em>png</em> or <em>jpg</em> of a specific date. I've got the following code:</p>
  
  <pre><code>year="2015"
  for f in $myFiles
  do
      if [[ $f = *"$year"{".png",".jpg"} ]]
      then
          echo $f
      fi
  done
  </code></pre>
  
  <p>This doesn't seem to work, no file passes the condition. I could do it by using two conditions, and using an <code>or</code> condition; but I was wondering what I am doing wrong. Brace expansion should work, otherwise how should I use it.</p>