const regex = /\/(.*?)[^so]?so/g;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('\\\/(.*?)[^so]?so', 'g')
const str = `]凕�����0w.:pR^C74\`�/j��g�<�懕^[�^D]�ᇕ�^Ev�LJPb�^TΫ�^Yϫ>
\$�U^ZL��L^X���^Ric��4�9Й^\\R�GyA�F�^M.˨��Ψ9F'˨\$K^C^D^T^@^HU@^H^@^}(G^@^@^@^@^@^@^@^@^@^@^@^@^[Z@^@^@assets/libstlport_shared.soĝ^K\`WT՝\\�^@lib/armeabi-v7a/libBreakpad.so��^
var test = "My cow always gives milk";using Firmglobal.Confirmit.UserManagement;using Firm/asda/asdglobal.Framework.Security.Permissions;
using Firmglobal.Framework.Security;asdsdasd/lib/armeabi-v7a/libBreakpad.soas /lib/armeabi-v7a/libLocalPreview.so @^}(G^@ /lib/armeabi-v7a/libphotoeffect.so 7a@^}(G^@ /assets/libstlport_shared.so -a
<3123>/lib/zxc1/lib1.so/lib/zxc2/lib2.so/lib/zxc3/lib3.sosfdsf/lib/asdas/.so<123123>`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions