Reply To: Isaac Harned – Here for forms with javascript

  • Isaac Harned

    Member
    October 28, 2022 at 9:10 am
    Points: 8,900
    Rank: UC2 Brainery Purple Belt III UC2 Brainery Purple Belt III

    Also the line:

    let childMask = new RegExp(“^” + tap + “-[\\d]{1,2}$”);

    when I plug this into regex101, I get some weird search parameters. Never worked with the RegEx constructor, so please bear with me here =)

    So if the previous tap variable only stores the number at the end of the string (Let’s say NumberOfTaps1), then this would be constructed as such:

    /^1-[\\d]{1,2}$/

    The part that is tripping me up is the double slashes I think, what does this do to the digit search?