Solved

Glitch in Regular Expression action by making the Replacement text field mandatory?

  • 11 January 2021
  • 2 replies
  • 11 views

Userlevel 3
Badge +9

The country name 'United Kingdom' becomes #UnitedKingdom  in all our articles and messages. Hashtags like this are used a lot. To create these we need to eliminate spaces from the country name. In NW Online I used to do this with a regex action and replace the pattern s (space) with nothing (empty replacement text). 



In NWC the Replacement text field is now suddenly mandatory. 





Is this a glitch or does anyone know another easy way to achieve the same result?

icon

Best answer by leighburke 12 January 2021, 02:05

View original

2 replies

Userlevel 5
Badge +6

@WouterT Create a variable and use that as the replacement text. As long as you don't set a value it should act as a blank.

Userlevel 3
Badge +9

Duh... I should have thought about that myself . A trick we unfortunately frequently have to use.



But anyhow: it works for now. Thanks @leighburke .



So for anyone who wants to eliminate spaces from a string, use the regular expression action like this:

Reply