Allow spaces in curly brackets in RegularExpressions

"aaab".match(/a{1, 2}/g) currently gives the result "null". Because there is a space after comma. While "aaab".match(/a{1,2}/g) will work just fine (["aa", "a"]).

My proposal: spaces after commas should be ignored in regular expressions and "aaab".match(/a{1, 2}/g) or "aaab".match(/a{1, 2}/g) should provide the result ["aa", "a"].

Setting spaces after commas is often recommended and encouraged both in code and in common texts. IMO, it would be logical to invoke that in regular expressions as well.

Hi!
This feature is known as free-spacing. Have a look at this old es-discuss thread, and someone already put together a /x flag proposal.