MATLAB: How to delete variables whose name contains a specific word

clearclear variablesexceptnamevariables

Let's say that I have three variables: var_red, var_blue, var_green, var2_blue
How can I specify to delete all the variables containing the word "blue"?
Thank you very much

Best Answer

The Matlab "clear" command accepts wildcards, so you can do
clear *blue;