%% Find Objects Using Regular Expression
% Create three line plots and assign an identifier to two of the plots.

x = linspace(-1,1);
y1 = x;
plot(x,y1)
hold on
y2 = x.^2;
plot(x,y2,'Tag','Quadratic')
y3 = exp(x);
plot(x,y3,'Tag','Exponential')
hold off

%
% Find all objects that have a nonempty Tag property.

h = findobj('-regexp','Tag','[^'']')

% Copyright 2020 The MathWorks, Inc.