isregexpmatched(str​, expression)

isregexpmatched is a wrapper of regexp function that returns logical array
ダウンロード: 17
更新 2016/2/22

ライセンスの表示

isregexpmatched is a wrapper of regexp function that returns logical
array whose element is true when there is at least one match for each
element of str. This one works with the syntax [startIndex = regexp(str,
expression)].
TF = isregexpmatched(str, expression)

str input text
string | cell array of strings | categorical array
Otherwise TF is an array of false whose size is the same as str

expression
regular expression
string | cell array of strings

TF logical array

Does not support 'outkey' option of regexp

EXAMPLES
* Cell array and char
isregexpmatched({'kjx127j02@0-1200.mat';'kjx127b03@0-1200.mat'},'127b03')
ans =
0
1

* char and cell array
isregexpmatched('kjx127j02@0-1200.mat', {'^kjx127j', 'kjx127b'})
ans =
1 0

* Cell array and cell array (matching length)
isregexpmatched({'kjx127j02@0-1200.mat';'kjx127b03@0-1200.mat'}, {'^kjx127j', 'kjx127X'})
ans =
1 0

引用

Kouichi Nakamura (2024). isregexpmatched(str, expression) (https://www.mathworks.com/matlabcentral/fileexchange/55582-isregexpmatched-str-expression), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2015b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCharacters and Strings についてさらに検索
タグ タグを追加

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0