So, here is the code I am working with:
var patt = new RegExp("/.+/g");
var device_id = patt.exec("javascript:project_id:256, device_id:2232");
Surprisingly, after running the above code, the value of device_id is empty and I can't seem to figure out why.
My actual goal is to extract the device id (2232), but I used the above pattern for testing because I thought it would return everything. Here is the regex I tried using for the device id:
/device_id:([0-9]+)/
I also attempted using javascript.match function, but unfortunately that didn't solve the issue either.