regexpcmp (strcmp meets regexp)

버전 1.0.0.0 (1.48 KB) 작성자: Jason Kaeding
Checks whether strings match a regular expression (pattern) or not.
다운로드 수: 699
업데이트 날짜: 2010/7/23

라이선스 보기

After a year of using cellfun to search for strings matching a regular expression, I developed this function. While it is easy to do in a single line of code, the line looks long and messy, so it is much cleaner and easier to read/understand when using this function. This is useful when you simply care whether the pattern exists in each string, not where it is nor what the actual found match is.

Syntax:
TF = regexpcmp(str,expr)
TF = regexpcmp(str,expr,'ignorecase')

str must be a string or cell array of strings
expr must be a valid regular expression
'ignorecase' option ignores the case of the regular expression

TF is a logical array which is true when a match is found, false otherwise

인용 양식

Jason Kaeding (2024). regexpcmp (strcmp meets regexp) (https://www.mathworks.com/matlabcentral/fileexchange/28279-regexpcmp-strcmp-meets-regexp), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0