No BSD License  

Highlights from
Simple String Cleanup Utility

from Simple String Cleanup Utility by Rob Slazas
Simple utility function that cleans up stray characters and spaces from strings so they can be used

cleanstr(instr)
function newstr = cleanstr(instr)
% Simple utility function that cleans up stray characters and spaces from 
% strings so they can be used without causing errors or changes in format.

strays = {'\W';  % \W = anything not alphabetic, numeric, or underscore
          '_'};  % adds underscore so doesn't subscript next character in plots

newstr = regexprep(instr,strays,'');

Contact us at files@mathworks.com