We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Output result when replace using searchbox with regex are not the same as the result from JavaScript.
searchbox
big_a1id_hide_a0aca1_fa2ag_a3-m
big_kid_hide_jack_flag_a3-m
const str = 'abcdefghijklm'; const rgx = /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)/i; const rpl = "$2$9$7_$11$9$4_$8$9$4$5_$10$1$3$11_$6$12$1$7_$13-"; const result = str.replace(rgx, rpl); // Output: big_kid_hide_jack_flag_a3-m console.log(result);
Google Chrome 128.0.6613.138 (64-bit)
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge2phdmFzY3JpcHR9IGZyb20gIkBjb2RlbWlycm9yL2xhbmctamF2YXNjcmlwdCIKCm5ldyBFZGl0b3JWaWV3KHsKICBkb2M6IGBjb25zdCBzdHIgPSAnXHg2MVx4NjJceDYzXHg2NFx4NjVceDY2XHg2N1x4NjhceDY5XHg2YVx4NmJceDZjXHg2ZCc7CmNvbnN0IHJneCA9IC8oYSkoYikoYykoZCkoZSkoZikoZykoaCkoaSkoaikoaykobCkvaTsKY29uc3QgcnBsID0gIiQyJDkkN18kMTEkOSQ0XyQ4JDkkNCQ1XyQxMCQxJDMkMTFfJDYkMTIkMSQ3XyQxMy0iOwpjb25zdCByZXN1bHQgPSBzdHIucmVwbGFjZShyZ3gsIHJwbCk7CgovLyBPdXRwdXQ6IGJpZ19raWRfaGlkZV9qYWNrX2ZsYWdfYTMtbQpjb25zb2xlLmxvZyhyZXN1bHQpO2AsCiAgZXh0ZW5zaW9uczogW2Jhc2ljU2V0dXAsIGphdmFzY3JpcHQoKV0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCgovLyBvdXRwdXQ6IGFiY2RlZmdoaWprbG0=
The text was updated successfully, but these errors were encountered:
That is true. But I don't think our docs promise that this works the same anywhere. Did you run into a practical issue caused by this?
Sorry, something went wrong.
No branches or pull requests
Describe the issue
Output result when replace using
searchbox
with regex are not the same as the result from JavaScript.big_a1id_hide_a0aca1_fa2ag_a3-m
big_kid_hide_jack_flag_a3-m
Browser and platform
Google Chrome 128.0.6613.138 (64-bit)
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge2phdmFzY3JpcHR9IGZyb20gIkBjb2RlbWlycm9yL2xhbmctamF2YXNjcmlwdCIKCm5ldyBFZGl0b3JWaWV3KHsKICBkb2M6IGBjb25zdCBzdHIgPSAnXHg2MVx4NjJceDYzXHg2NFx4NjVceDY2XHg2N1x4NjhceDY5XHg2YVx4NmJceDZjXHg2ZCc7CmNvbnN0IHJneCA9IC8oYSkoYikoYykoZCkoZSkoZikoZykoaCkoaSkoaikoaykobCkvaTsKY29uc3QgcnBsID0gIiQyJDkkN18kMTEkOSQ0XyQ4JDkkNCQ1XyQxMCQxJDMkMTFfJDYkMTIkMSQ3XyQxMy0iOwpjb25zdCByZXN1bHQgPSBzdHIucmVwbGFjZShyZ3gsIHJwbCk7CgovLyBPdXRwdXQ6IGJpZ19raWRfaGlkZV9qYWNrX2ZsYWdfYTMtbQpjb25zb2xlLmxvZyhyZXN1bHQpO2AsCiAgZXh0ZW5zaW9uczogW2Jhc2ljU2V0dXAsIGphdmFzY3JpcHQoKV0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCgovLyBvdXRwdXQ6IGFiY2RlZmdoaWprbG0=
The text was updated successfully, but these errors were encountered: