/xcvk3333.jpg*cjvj'; var regExp = /\/(\w*)\.(jpg|gif|bmp)/g; var arrs = str.match(regExp).to">