Detect HTML Tags

  • + 0 comments

    Javascript solution

    let tags = input.match(/(?<=\<)[^\s>\/]+(?=[\s>])/g)
    tags = tags.filter((x, i, a) => a.indexOf(x) == i)
    console.log(tags.sort().join(';'))