function webfigs_rm(pattern)

httproot = ['http://www.damtp.cam.ac.uk/user/holyoake/matlab'];


[a b] = unix(['find ~/public_html/matlab -mindepth 1 -maxdepth 1 -type d ! -name img ! -name scripts ! -name styles -name "' pattern '"']);

c = regexp(b,'\n','split');

for i=1:length(c)-1
disp(['Deleting ' c{i}]);
unix(['rm -Rf ' c{i}]);

end; 
 
webfigs_links(httproot);
