Skip to main content
Nintex Community Menu Bar
Solved

How do I replace special characters with a space?

  • June 24, 2023
  • 4 replies
  • 515 views

Forum|alt.badge.img+15

Ok, so I can’t find anything on ADDING a space to replace special characters. How do I add a space to the “replacement text” field? It’s not working if I just put a space in my text variable. Please help, as I want to split by spaces.

Best answer by nico

You can’t add a space directly in the input of an action. The input is automatically trimed.

 

For simplicity, I suggest changing the replacement char. (For exemple a - or a string empty).

 

 

If your realy want a space char, you can generate it : 

 

1- Create a String variable, that is never initiated (So, with this variable, you will have an empty string).

2- With an ‘Apply a regular expression’ you will generate you space.

 

This is the configuration of the Regular expression : 

 

 

So : We will replace the “a” char in the texte “a a” by an empty string, and store the first result in a variable colled “Space”. And as a result (the value of your variable ‘speace’) will be a space char. And so, you will be able to replace your special char by a space. 

 

 

 

4 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • June 26, 2023

Hi @brandiwoodson ,

 

This looks similar to this post for O365.
My suggestion there may help here.
 

 


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • July 17, 2023

Hi @brandiwoodson 
Did Simon’s response help answer your question? 


nico
Forum|alt.badge.img+10
  • Rookie
  • Answer
  • July 17, 2023

You can’t add a space directly in the input of an action. The input is automatically trimed.

 

For simplicity, I suggest changing the replacement char. (For exemple a - or a string empty).

 

 

If your realy want a space char, you can generate it : 

 

1- Create a String variable, that is never initiated (So, with this variable, you will have an empty string).

2- With an ‘Apply a regular expression’ you will generate you space.

 

This is the configuration of the Regular expression : 

 

 

So : We will replace the “a” char in the texte “a a” by an empty string, and store the first result in a variable colled “Space”. And as a result (the value of your variable ‘speace’) will be a space char. And so, you will be able to replace your special char by a space. 

 

 

 


Forum|alt.badge.img+15
  • Author
  • Communicator
  • August 31, 2023

You can’t add a space directly in the input of an action. The input is automatically trimed.

 

For simplicity, I suggest changing the replacement char. (For exemple a - or a string empty).

 

 

If your realy want a space char, you can generate it : 

 

1- Create a String variable, that is never initiated (So, with this variable, you will have an empty string).

2- With an ‘Apply a regular expression’ you will generate you space.

 

This is the configuration of the Regular expression : 

 

 

So : We will replace the “a” char in the texte “a a” by an empty string, and store the first result in a variable colled “Space”. And as a result (the value of your variable ‘speace’) will be a space char. And so, you will be able to replace your special char by a space. 

 

 

 

Brilliant, I will have to try this!