Fixed regexp Matlab/Octave compatibility issues