I have this string:
s='data-id="a1429883480588" class="privateMessage" @zaza
data-id="a1429883480589" class="privateMessage" @zaza2
data-id="a1429883480598" class="privateMessage" @zaza3'
My goal is to capture the what's between : data-id=" and " to have results: [a1429883480588, a1429883480589, a1429883480598]
I tried with
var splitted = s.match(/data-id="(\w)+(?=")/g)
But this also captures data-id=" and "
Any idea on how to write this regex ?
It must be done with JS since it is nodeJS function !