Skip to content

String.prototype.replace does not work with replacement patterns #938

@ChALkeR

Description

@ChALkeR
> 'abc'.replaceAll(/(b)/g,'[$1]')
SmallString("a[$1]c")
> 'abc'.replaceAll(/(b)/g,'[$$]')
SmallString("a[$$]c")

Should be:

> 'abc'.replaceAll(/(b)/g,'[$1]')
'a[b]c'
> 'abc'.replaceAll(/(b)/g,'[$$]')
'a[$]c'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions