?? containsregexp.m
字號(hào):
function tf = containsRegexp(str, exp)
%containsRegexp True if string contains regular expression
% TF = containsRegexp(str, exp) returns true if the string str contains the
% regular expression exp. If str is a cell array of strings, then
% containsRegexp tests each string in the cell array, returning the results in
% a logical array with the same size as str.
% Steven L. Eddins
% Copyright 2008-2009 The MathWorks, Inc.
% Convert to canonical input form: A cell array of strings.
if ~iscell(str)
str = {str};
end
matches = regexp(str, exp);
tf = ~cellfun('isempty', matches);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -