repl: fix tab completion for object properties with special characters
The old RegExp will pass property names like "hello world!"
when filtering the results of tab complete. This change is to fix it.
By the way, now the repl module doesn't support tab complete like obj[<tab>
. Is there any plan for this?
Fixes: https://github.com/nodejs/node/issues/21201
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines