wilcard usage with strncmp
古いコメントを表示
I have a cell array data (C). I use the following code to find specific character in the C;
find_character = strncmp(C, '* 2020', 7);
How can I use wilcard using strncmp to find all patterns satisfy * [0-9][0-9][0-9][0-9]? For example, if * 1988 or * 2000 exist in C, they can be also extracted.
採用された回答
その他の回答 (1 件)
Image Analyst
2021 年 5 月 16 日
0 投票
Use the pattern functionality. I think it's easier than regexp().
>> doc pattern
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!