Matlab examples of "regexp" where "expression" is a string array or cell array of characters?
조회 수: 6 (최근 30일)
이전 댓글 표시
The documentation for regexp seem to only illustrate use cases for which the "expression" argument is a single regular expression.
Are there online examples of use cases in which the "expression" argument consists of a string array or a cell array of characters?
댓글 수: 0
채택된 답변
the cyclist
2023년 1월 3일
I'm not sure what you are looking for, but the function's behavior generalizes as you might expect:
str = "it is what it is";
out_single = regexp(str,"it")
out_multi = regexp(str,["it";"is"])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!