How to get common sub string in cell array string?
显示 更早的评论
Example:
cell_arr =
3×1 cell array
{'A.A1.A11.A111' }
{'A.A1.A12.A121' }
{'Event_State.Chart.A.A1.A12'}
How to get output = A.A1 ?
采纳的回答
更多回答(1 个)
fund_cell = regexp(cell_arr , 'A.A1', 'match');
result = [fund_cell{:}]
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!