strrep with replacing precise word and no ' ' explicit in code
1 次查看(过去 30 天)
显示 更早的评论
i have an array in a loop:
use{i,1}=strrep(use{i,1},statename{j,1},xx{1,j})
the idea is to find precise statenames and repacle them with xx
but its doing parts.
how do i use the lookbefoe and after idea here, with no ' 'in the code?
DJ
0 个评论
采纳的回答
Walter Roberson
2018-9-19
Do not use strrep for this: use regexprep with lookaround operators.
2 个评论
Walter Roberson
2018-9-19
Are you sure comma to be part of the list? Those are literal comma not range separators.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!