「。」で始まるファイル内のすべての文字列を見つけようとしています。MATLAB で。私は次のコードを持っています、
data_files = 's.txt';
C = textread(data_files, '%s', 'delimiter', '\n');
filetext = fileread(data_files);
expr='\.' ;
fileread_info = regexp(filetext, expr, 'match');
fid = fopen('size.txt', 'wt');
fprintf(fid, '%s\n',fileread_info{:});
入力:
.hello world
hello there
.can i help you
no
出力は次のとおりです。
.
.
それ以外の
.hello world
.can i help you
「。」で始まる文字列全体を抽出するにはどうすればよいですか。「。」と書くだけではなく、ファイルに?