[quickjs-devel] An issue about RegExp escape sequence

  • From: "Livy" <958268052@xxxxxx>
  • To: "quickjs-devel" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Thu, 20 Feb 2020 22:29:00 +0800

# Version: quickjs-2020-01-05


# Testcase:
var NISLFuzzingFunc = function(){
&nbsp; &nbsp; var regex = new RegExp("/{1ab}/");
&nbsp; &nbsp; print(regex);
};
NISLFuzzingFunc ();


# Command:
quickjs-2020-01-05/qjs testcase.js


# Output:
SyntaxError: nothing to repeat


# Expected output:
/{1ab}/


# Description:
There are two ways to use "{}" according to ES10, one is quantifiers, the other 
is RegExp Unicode Escape Sequence. For the second usage, however, if the 
sequence inside {} is start with a number, an exception is thrown. Maybe this 
is an issue of Quickjs.


Best Regards,
Livy

Other related posts:

  • » [quickjs-devel] An issue about RegExp escape sequence - Livy