g.e. I would like to prepend all occurrences of the string "foo" with three spaces:
value.replace(/(foo)/, " " + "$1")
value.replace(/(foo)/, " $1")
value.replace(/(foo)/, " " + " " + " $1")
all return
foo
instead of
foo
g.e. I would like to prepend all occurrences of the string "foo" with three spaces:
value.replace(/(foo)/, " " + "$1")
value.replace(/(foo)/, " $1")
value.replace(/(foo)/, " " + " " + " $1")
all return
foo
instead of
foo