How to use js to cut the strings of words in array

there is now a value in array that is
"qwe.jpgwwerwer.jpgwrwerewr.JPG"

I want to grab the picture URL to display the picture, but because the URL is all connected

how can I cut him into qwe.jpg wwerwer.jpg wrwerewr.JPG

?

tried using split (/ (.jpg) /), but left a space before and after jpg

is there any way to meet my needs

Feb.28,2021

let str = "qwe.jpgwwerwer.jpgwrwerewr.jpg"

console.log(str.match(/(?<=^|.jpg)(.+?).jpg/g));
console.log(str.replace(/(?<=.jpg)/g,' '));
Menu