Positive Lookbehind

  • + 0 comments

    My solution using typescript:

    function main() {
        // Enter your code here
        const regexPattern: RegExp = /(?<=[13579])\d/g
        const test: string = readLine()
        console.log("Number of matches : " + test.match(regexPattern).length)
    }