regexp function that checks if a specific letter is in the end of a cell (last character)
조회 수: 3 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Fangjun Jiang
2021년 11월 10일
편집: Fangjun Jiang
2021년 11월 10일
Don't even need regexp()
metForm{i}(end)=='P'
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!