没有出现楼主所说的问题。
x.txt
function findreplace(file,otext,ntext,varargin)
%FINDREPLACE finds and replaces strings in a text file
%
% SYNTAX:
%
% findreplace(file,otext,ntext)
% findreplace(file,otext,ntext,match)
%
% findreplace : This function finds and replaces strings in a text file
%
% 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)
%
>> findreplace('D:\x.txt','%','a')
15 Changes Made & Saved Successfully
处理得到的结果:
function findreplace(file,otext,ntext,varargin)
aFINDREPLACE finds and replaces strings in a text file
a
a SYNTAX:
a
a findreplace(file,otext,ntext)
a findreplace(file,otext,ntext,match)
a
a findreplace : This function finds and replaces strings in a text file
a
a file: text file name (with or without path)
a otext: text to be replaced (old text)
a ntext: replacing text (new text)
a match: either (1) for match case or (0) to ignore case
a default value is (1)
a
|