Positive Lookahead

  • + 0 comments

    ts

    function main() {
        // Enter your code here
        let regexPattern: RegExp = /o(?=oo)/g;
        let testString:string = readLine();
        console.log("Number of matches : " + testString.match(regexPattern).length)
    }