wilcard usage with strncmp
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 16 Mai 2021
0 Stimmen
Use the pattern functionality. I think it's easier than regexp().
>> doc pattern
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!