In this HackerRank Day 7: Regular Expressions III 10 days of javascript problem solution Complete the function in the editor below by returning a RegExp object, re, that matches every integer in some string s.

HackerRank Day 7: Regular Expressions III problem solution


Problem solution in JavaScript programming.

function regexVar() {
    /*
     * Declare a RegExp object variable named 're'
     * It must match ALL occurrences of numbers in a string.
     */
    let re = /\d*\d(?!\d)/g;
    
    /*
     * Do not remove the return statement
     */
    return re;
}