Skip to content

stuff in brackets seems not to make it to the replacement #16

@jobe451

Description

@jobe451

I don't get the replacement with $1 running.

I copied this rule from the examples to my code (after trying for some time more sensible stuff):

pipe(replace(/version(={1})/g,` '$1v0.2.2')

In my HTML-File I have this

...
version=1
...

I would expect to see this output on the command line (since the bracktes match the single = character)

Replaced: "version=" to "=v0.2.21" in a file:

However, what I get is that:

Replaced: "version=" to "$1v0.2.21" in a file:

I would expect it to work the same, as I type this on the browser console (which also returns "=v0.2.21"),

"version=1".replace(/version(={1})/g, '$1v0.2.2');

What did I not understand?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions