You can use 2 capture groups
https?:\/\/[^/]*(\/wp-content\/uploads\/\d{4}\/\d{2}\/)([^\/\s]+)
https?:\/\/[^/]*
Match the protocol to before the first /
(
Capture group 1
\/wp-content\/uploads\/\d{4}\/\d{2}\/
Match /wp-content/uploads/
4 digits /
2 digits /
)
Close group 1
([^\/\s]+)
Capture group 2, match 1+ time any char except /
or a whitespace char
Regex demo
const s = `https://getintopc.com/wp-content/uploads/2021/09/VideoHive-Happy-Kids-Slideshow-Premiere-Pro-MOGRT-Free-Download-GetintoPC.com_-300x169.jpg https://getintopc.com/wp-content/uploads/2021/09/VideoHive-Happy-Kids-Slideshow-Premiere-Pro-MOGRT-Direct-Link-Free-Download-GetintoPC.com_-300x169.jpg https://getintopc.com/wp-content/uploads/2021/09/VideoHive-Happy-Kids-Slideshow-Premiere-Pro-MOGRT-Full-Offline-Installer-Free-Download-GetintoPC.com_-300x169.jpg https://getintopc.com/wp-content/uploads/2021/09/VideoHive-Happy-Kids-Slideshow-Premiere-Pro-MOGRT-Latest-Version-Free-Download-GetintoPC.com_-300x169.jpg`;
const regex = /https?:\/\/[^/]*(\/wp-content\/uploads\/\d{4}\/\d{2}\/)([^\/\s]+)/g;
const res = Array.from(s.matchAll(regex), m => [m[1], m[2]]);
console.log(res);
Or a bit broader version, first matching folders starting with [a-z]
followed by folders starting with a digit and ending the last part on for example .jpg
https?:\/\/[^/]*((?:\/[a-z][^/]*)+(?:\/\d+)+\/)([^\/]+\.jpg)
Regex demo