Answer the question
In order to leave comments, you need to log in
How to leave only numbers in Gulp Rename?
rename = require("gulp-rename");
.pipe(rename({
Takes the original name of the file. It is necessary that the name be displayed in dest, in which only numbers remain from the original. How to do it?
file-546219-orig.jpg => 546219.jpg
Answer the question
In order to leave comments, you need to log in
.pipe(rename(function (path) {
path.basename = path.basename.replace(/\D/g, '');
}))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question