regex before and after character
const string = 'host_shopping.sql';
const regex = new RegExp('(?<=[_]).*(?=[\.])');
let regArray = regex.exec( string );
console.log( regArray[0] );
// shopping
console.log( string.test(regex) );
//true
/*
-> regex before & after character.
-> with no group and can find at 0 index.
-> lookbehind and lookahead must be supported where to use.
*/