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
var stringHasAll = (s, query) =>
// convert the query to array of "words" & checks EVERY item is contained in the string
query.split(' ').every(q => new RegExp('' + q + '', 'i').test(s));
// tests
[
'', // true
' ', // true
'aa', // true
'aa ', // true
' aa', // true
'd b', // false
'aaa', // false
'a b', // false
'a a a a a ', // false
].forEach(q => console.log(
stringHasAll('aA bB cC dD', q)
))
Run code snippet
const string = "This is a very long string";
const match = string.match(/very/);
console.log(match) // ['very', index: 10, input: 'This is a very long string', groups: undefined]