As with regulary to get Id?

Need this variable
var id = "<div id="\"ap:sd:8\"" class="\"ap-sd-sim-er\""></div>";


To get an ID, what would the output was this:
ap:sd:8

How to implement it using regular expressions?

Thanks In Advance
July 9th 19 at 12:54
1 answer
July 9th 19 at 12:56
Solution
id.match(/id="(.+?)"/)[1]

Find more questions by tags JavaScript