Can you help me figure out how to count the checkmarks in a given string? The string I'm working with looks like this:
var myString = "one ✔ two ✔ three ✔"
I attempted using
myString.match(/✔/g) || []).length;
, but unfortunately, it's returning 0
(I think this is due to the fact that ✔ is considered a dingbat symbol).
I checked the unicode for "✔" and found it to be 2714. Is there a way to incorporate this into my expression?