I have tried a few different techniques to match just numbers from my DIV but keep failing.
Currently my example html looks like the following.
<div data-video="22" class="stars starrr"></div>
<div data-video="/test/22" class="stars starrr"></div>
<div data-video="/someother/test/22" class="stars starrr"></div>
I need to only match the number in video, but I keep getting it to work with some and failing with others.
My current code
$(this).data("video").match(/([\d]+)/);
Current Error on first match The others work
Uncaught TypeError: undefined is not a function