How to avoid Object is possibly null in VSCode though code runs ok
let url = 'https://test.com/test/varstring/stringtoextract?id=test3'
let regex = /https://test.com/test/varstring/.+/(.+)?.+/
var match = regex.exec(url);
alert(match[1]);
question from:https://stackoverflow.com/questions/66052881/typescript-object-is-possibly-null