Using Regex to add a space into a text field

  • 10 July 2019
  • 1 reply
  • 186 views

Badge +1

I think I must be missing something.   I was using a regex to replace a character in a text field.   I needed to replace a comma with a semi-colon and a space.   It added the semi-colon but not the space.

 

Not sure what I am missing here.


1 reply

Userlevel 6
Badge +22

Hi,


It seems you cannot add a space with a regular expression action as you have found out.


The only other way I got this to work was to use the Regular Expression action to split the string based on the comma.  This outputs into a collection variable.  I then used two Get Item From collection actions to get the two parts on either side of the comma.


Then used a build string to put them back togeter with a semicolon and a space.


 


Workflow looked like this:



Workflow also attached that splits my name Simon,Muntz and changes it to Simon; Muntz and logs it to the history.

Reply