Question

Add space and letter to text in string

  • 20 October 2021
  • 1 reply
  • 5 views

Hi again,

 

I would like to change my string containing "100000,00" to "100 000,00E". In other words, adding a space and an E in the string. I can not seem to find an easy solution for this.

 

Thanks in advance!


1 reply

Userlevel 4
Badge +25

You can use a StringReplacer with a regular expression.

 

Assuming you want to replace 100000 with 100 000 and 200000 with 200 000 and so on you can use (^.00) as your regular expression and \\1 as your replacement text (that's \\1 with a space behind it!)

Reply