regexp function that checks if a specific letter is in the end of a cell (last character)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ioannis Vourvachakis
am 10 Nov. 2021
Kommentiert: Ioannis Vourvachakis
am 10 Nov. 2021
This regexp function checks if there is a capital P in metForm folowed by any capital letter.
x= regexpi(metForm(i,1),'(?-i)P[A-Z]');
I want a similar regexp function that will check if the capital P is the last character in metForm (in the end and not followed by anything).
metForm is a cell array like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/796629/image.png)
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 10 Nov. 2021
Bearbeitet: Fangjun Jiang
am 10 Nov. 2021
Don't even need regexp()
metForm{i}(end)=='P'
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!