let regex=/(\d*(,|\.)?\d)(.)*(\s+followers)/g;
let result=regex.exec("<div class=\"Content EmbedFrame\" style=\"\">\n" +
"<a class=\"EmbeddedMedia\" href=\"https://www.instagram.com/p/tsxp1hhQTG/?utm_source=ig_embed&ig_mid=93153B6F-2C77-4A9A-946F-3405DC4F16BA\" data-ios-link=\"media?id=823251211150230726&utm_source=ig_embed&ig_mid=93153B6F-2C77-4A9A-946F-3405DC4F16BA\" data-log-event=\"mediaClick\" target=\"_blank\">\n" +
"<img class=\"EmbeddedMediaImage\" src=\"https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/e15/1538350_1528374764070564_1190643161_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=100&_nc_ohc=QazMmTOnHP0AX85I8r7&oh=e504703e829858339c69701b46f119e4&oe=5EA354E6\" srcset=\"https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/e15/1538350_1528374764070564_1190643161_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=100&_nc_ohc=QazMmTOnHP0AX85I8r7&oh=e504703e829858339c69701b46f119e4&oe=5EA354E6 640w,https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/e15/1538350_1528374764070564_1190643161_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=100&_nc_ohc=QazMmTOnHP0AX85I8r7&oh=e504703e829858339c69701b46f119e4&oe=5EA354E6 750w,https://scontent-atl3-1.cdninstagram.com/v/t51.2885-15/e15/1538350_1528374764070564_1190643161_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_cat=100&_nc_ohc=QazMmTOnHP0AX85I8r7&oh=e504703e829858339c69701b46f119e4&oe=5EA354E6 1080w\" />\n" +
"\n" +
"</a>\n" +
"<span class=\"FollowerCountText\">\n" +
"339.7m followers\n" +
"</span>\n" +
"</div>\n");
console.log(result)
In above code block ,no match is returned in react native , but getting ["339.7m followers", "339.7", ".", "m", " followers"] In the Chrome console. This is simple JS and should work identical in both places, in my opinion.
Have I done something wrong?