May 27, 2021, 5:19:57 AM5/27/21
We've got Spidermonkey78 embedded into our software and users reported seeing 'too much recursion' while trying to search for non-whitespace characters using regular expressions.
We couldn't reproduce the problem with the example we were shown (can post that snippet if need be) but can certainly see the same error ('too much recursion') with the following example:
const str1 = "Check this sentence for non-whitespace characters";
const patt1 = /\S/g; // too much recursion
//const patt1 = /[^ ]/g; // too much recursion
//const patt1 = /c/g; // search for the char 'c' runs fine
var result1 = str1.match(patt1);// this is the line that provokes the error
// Message(result1); // custom method
This runs cleanly on Firefox 88 with the console.log command.
We aren't sure what we could've possibly done to break standard regex functionality. Any suggestions please?