findreplace

版本 1.0.0.0 (2.8 KB) 作者: Fahad Al Mahmood
This function finds and replaces strings in a text file
13.3K 次下载
更新时间 2005/12/27

查看许可证

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);

引用格式

Fahad Al Mahmood (2024). findreplace (https://www.mathworks.com/matlabcentral/fileexchange/9447-findreplace), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14SP3
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0