0

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
XedMada
  • 151
  • 8

1 Answers1

0

Did you try the follow GREL expression value.replace('foo', ' foo') ?

magdmartin
  • 1,712
  • 3
  • 20
  • 43