Matlab examples of "regexp" where "expression" is a string array or cell array of characters?
7 次查看(过去 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!