Multiple Replace Operations
See original GitHub issueIs it possible to do multiple find and replace operations with this plugin a bit like how gulp-batch-replace works?
var replacements = [
[ 'original', 'replacement' ],
[ 'original1', 'replacement1' ],
[ 'original2', 'replacement2' ]
// ...N number of replacements.
];
var replace = require('gulp-replace');
gulp.task('templates', function(){
gulp.src(['file.txt'])
.pipe(replace(??????????)) // What do I do here?
.pipe(gulp.dest('build/file.txt'));
});
Issue Analytics
- State:
- Created 8 years ago
- Reactions:9
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Excel: find and replace multiple values at once - Ablebits
The easiest way to find and replace multiple entries in Excel is by using the SUBSTITUTE function. The formula's logic is very simple:...
Read more >Quicker Multiple Replace Operations (Microsoft Word)
When you are specifying the number of tabs to replace, it is best to use a multiple of two. For instance, in the...
Read more >How to replace multiple substrings of a string? - Stack Overflow
Here is a short example that should do the trick with regular expressions: import re rep = {"condition1": "", "condition2": "text"} # define...
Read more >Python | Replace multiple characters at once - GeeksforGeeks
The replacement of one character with another is a common problem that every Python programmer would have worked with in the past.
Read more >5 Ways to Replace Multiple Characters in String in Python
In this article, we will learn how to replace multiple characters in a string in ... Strings have many operations to be performed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to accomplish the multiple replaces very easily with the pseudo code from @chebum
here is a more fleshed out example:
hope this helps
That breaks the Gulp pipeline flow.