Simple text finder(files, streams) via gulp.
npm install --save-dev gulp-find
var find = require('gulp-find');
gulp.task('templates', function(){
gulp.src(['file.txt'])
.pipe(find(/foo(.{3})/g))
.pipe(gulp.dest('build/file.txt'));
});
var find = require('gulp-find');
gulp.task('templates', function(){
gulp.src(['file.txt'])
.pipe(find('bar'))
.pipe(gulp.dest('build/file.txt'));
});
Use gulp-replace for string replace.
if you need first find, and replace after, you may combine gulp-find
and gulp-replace
via pipe