isregexpmatchedany(​str, expression)

isregexpmatchedany is a wrapper of regexp function that returns a scalar logical
15 téléchargements
Mise à jour 22 fév. 2016

Afficher la licence

isregexpmatchedany is a wrapper of regexp function that returns a scalar
logical which is true when there is at least one match for any elements
of str. This one works with the syntax [startIndex = regexp(str,
expression)].
TF = isregexpmatchedany(str, expression)
str input text
string | cell array of strings | categorical array
Owtherwise TF is false

expression
regular expression
string | cell array of strings

TF scalar logical

Does not support 'outkey' option of regexp

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

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

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

See also
isregexpmatched

Written by
Kouichi C. Nakamura, Ph.D
Kyoto University
Dec 2015

Citation pour cette source

Kouichi Nakamura (2024). isregexpmatchedany(str, expression) (https://www.mathworks.com/matlabcentral/fileexchange/55583-isregexpmatchedany-str-expression), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2015b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Characters and Strings dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0

remove email