var str = 'https://dev-bmm-assets.s3.ap-south-1.amazonaws.com/footage-zip%2FAMZ-SF-FSH00685.zip'; var value = str.match('%2F')[1]; alert(value); // 226885