Posted By

almazom on 05/06/11


Tagged

ruby regexp filter


Versions (?)

Ruby Regexp example for filter files


 / Published in: Ruby
 

  1. list = Dir.entries(@fullpath2images)
  2.  
  3. for l in list
  4. if /^plan_#{params[:id]}_(sm|big)_.*/ =~l
  5. File.delete(l)
  6. end
  7. end

Report this snippet  

You need to login to post a comment.