i would like to replace the css background urls like these:
body {
background: url("../common/images/nyau.jpg") center center;
}
.alma {
background: url("./vau/vau.jpg");
}
.ata {
background: url("./mak.jpg");
}
to these:
body {
background: url("./images/nyau.jpg") center center;
}
.alma {
background: url("./images/vau.jpg");
}
.ata {
background: url("./images/mak.jpg");
}
Unfortunately i am not familiar with regex at all.
I know i can select ("../common/images/nyau.jpg") this part with /\((.*?)\)/g but i need to capture the part from the last / (nyau.jpg) somehow. So i could do ./images/$1 or something like that.
EDIT: in the api of gulp-replace i am only allowed to use regular expressions without any javascript function.
backgroundproperty ? Lastbackgroundset would overwrite previous twobg = './images/' + bg.split('/').pop()