I have been using the function who as I found in this SO answer for finding variables in the workspace that match a string.
I have been trying without problem:
who('-regexp', 'signal');
That will return a list of variables containing the string 'signal', such as:
'signal'
'signal1'
'signal_RMS'
'signal1_RMS'
But I want to know how I can find variables adding exceptions, such as "exclude the variables that ends with '_RMS' ".
I tried including regular expressions as I found in Matlab documentation (regexp), with no luck, and the closer thing I found was something like this:
who('-regexp', 'signal(?!_RMS)');
But this will only exclude the variables 'signal' that are immediately follow by '_RMS',
'signal'
'signal1'
'signal1_RMS'
Any hint on how I can handle expressions to find variables such as "start with 'string', do not end up with 'otherstring' " ?
'signal(?!.*_RMS$)'?