-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 target string is "\" in replace function is different with brower. #25812
Comments
It is just a different representation of the same string: browser console outputs a simple readable representation as a visible text, Node,js console outputs a source code representation, i.e. what you need to write in the code to get this string. Try in both consoles |
Thanks for relpy, I want replace "?" to "". |
Your code seems valid for this purpose. |
no no, It return "duan\\chao" (2"\") in node.js, |
It is just displayed this way in the Node.js console, with escaped backslash. Both results are identical, they have the same length and characters. You can check |
Yeah, I get it, thank you very much. |
Version:
v10.15.0
Platform:
Linux moon 3.10.0-862.14.4.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Subsystem:
The text was updated successfully, but these errors were encountered: