This regex pattern will match specific image file names like '1.jpg', '2.jpg', 'image.jpg', or 'scam.jpg'. The '^' asserts the start of the string, '/' matches the forward slash, '(1|2|image|scam)' matches any of the specified image names, '\.' matches the dot before 'jpg', 'jpg' matches the file extension, and '$' asserts the end of the string.
const regex = /^/(1|2|image|scam)\.jpg$/;
Copiar