Skip to main content
Nintex Community Menu Bar

Using Regex to add a space into a text field

  • July 10, 2019
  • 1 reply
  • 288 views

Forum|alt.badge.img+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

SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • July 11, 2019

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.