findreplace
Version 1.0.0.0 (2,77 KB) von
Fahad Al Mahmood
This function finds and replaces strings in a text file
SYNTAX:
findreplace(file,otext,ntext)
findreplace(file,otext,ntext,match)
file: text file name (with or without path)
otext: text to be replaced (old text)
ntext: replacing text (new text)
match: either (1) for match case or (0) to ignore case. Default value is (1)
Example:
findreplace('sample.txt','Moller','Moler');
findreplace('sample.txt','jake','Jack',0);
findreplace('sample.txt','continue it is','continue its',0);
Zitieren als
Fahad Al Mahmood (2026). findreplace (https://de.mathworks.com/matlabcentral/fileexchange/9447-findreplace), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R14SP3
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Characters and Strings finden Sie in Help Center und MATLAB Answers
Tags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.0.0 |
