-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace functionality broken in 4 and 4.1 #3240
Comments
I'm not sure what you're getting at. Are you confused by the REPL printing backslashes in escaped form? |
My apologies I pasted a missing example which is core to the issue:
The core issue here is the replace function; given the string Which gives me |
There are no double backslashes in |
While there is no issue with Node.js REPL:
Chrome console:
Not saying anything needs to be done necessarily, but worth noting at least, I think. |
I suspect the repl is not formatting strings. Could that be the case? |
Firefox too turns a |
Seems not an issue at all. |
Agreed, closing. |
find the repl ouput confusing too. |
If you don't think it's a issue, How can I save a value like I need to create a json file contain the regexp string stuff. {
"regex": "a\/b"
} |
Here you go: var str = String.raw`a\/b`; |
Thanks, didn't know that function before. But I need to write the content fo a file and use |
That's right. Then you can do |
Thank you @bricss . really helpful. |
hi , var user="DOMAIN\USERNAME" console output:DOMAIN\USERNAME. I am Trying to the user to connect to mssqlserver data base using mssql package. After assigning the user, and when tried to print the config getting the below output NODE REPL OUTPUT: Seems to be the same issue but because of this not able to connect to the db, getting error: ConnectionError: Login failed for user |
Hello
There seems to be an issue with Node's implementation of replace. The behavior appears to escape the backslashes; please see the output below:
Chrome's output (via console)
The text was updated successfully, but these errors were encountered: