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
Hi,
The following code snippet works incorrectly for RegExp
let re = /(\w+)\s(\w+)/ let str = 'John Smith' let newstr = str.replace(re, '$2, $1') console.log(newstr)
Expected: Smith, John Got: Smith, $1
Smith, John
Smith, $1
thanks
The text was updated successfully, but these errors were encountered:
Hmmm. This this is probably a bug in String.prototype.replace.
String.prototype.replace
Sorry, something went wrong.
I think I've found the mistake and the fix, I'll open a PR soon.
Fix: String.prototype.replace for multiple capture groups, closes boa…
24eda41
…-dev#610
Test: Add test for boa-dev#629, based on boa-dev#610
9c69cca
Multi-line description of commit, feel free to be detailed.
eb813fd
Fix: String.prototype.replace substitutions, closes #610 (#629)
be20b65
RageKnify
Successfully merging a pull request may close this issue.
Hi,
The following code snippet works incorrectly for RegExp
Expected:
Smith, John
Got:
Smith, $1
thanks
The text was updated successfully, but these errors were encountered: