Skip to content

replaceAll("localhost:3000", "example.com") doesn't work / readSync doesnt read #3101

@chibbi

Description

@chibbi

Version:v15.2.1
Platform: Linux raspberrypi 5.4.51-v7+ nodejs/node#1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
Linux manjaroPC 5.9.10-1-MANJARO nodejs/node#1 SMP PREEMPT Sun Nov 22 11:25:19 UTC 2020 x86_64 GNU/Linux

What steps will reproduce the bug?

run
replaceAll("localhost:3000", "example.com")
on a String containing it
(i use it to run go through my html and js files that have links like that to quickly change between
localhost:3000 => testServer
example.com => Production)

How often does it reproduce? Is there a required condition?

Nearly always.
I think it worked once but i tried it like 20times or smth like that xD

What is the expected behavior?

to change every occurance of "localhost:3000" to "example.com"

What do you see instead?

It changes no occurance at all

Additional information

i am thinking, that maybe splitting it to

replaceAll("localhost", "example")
replaceAll(":3000", ".com")

will work, but i havent tried it yet

but that would still be more a hack to get it to work than have it actually working (in my mind)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions