strrep with replacing precise word and no ' ' explicit in code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dominique Joubert
am 19 Sep. 2018
Kommentiert: Walter Roberson
am 19 Sep. 2018
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 19 Sep. 2018
Do not use strrep for this: use regexprep with lookaround operators.
2 Kommentare
Walter Roberson
am 19 Sep. 2018
Are you sure comma to be part of the list? Those are literal comma not range separators.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!