[whatwg/dom] Regular expressions do not allow spaces where they should. (#854)

I would like to propose solving the following issue:

"aaab".match(/a{1, 2}/g) currently provides "null" result.  Because there is the 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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/854

Received on Tuesday, 7 April 2020 11:49:07 UTC