Regex - How Do I Add A Line Break?

  • 1 April 2019
  • 4 replies
  • 765 views

Badge +9

Has anyone figured out how to add a line break using Regex in O365? Enter, [ ], all don't work.


4 replies

Badge +17

Can you provide more details to what you are trying to do? Adding a line break is simply but depends on how you want to capture or group the data to put a line break in front or behind. 

Badge

If you are trying to add a line break to Multi line text field via workflow, none of the Nintex onprem options works in Nintex 0365 (e.g [
],
, <br>, <br/>, {Common:NewLine}, CDATA BR). I got a not so clean workaorund for this issue. Line break can be added using an empty Mutli-line text field and Replace String Regex. Steps shared below.


1) Create a temp Multi-line text column, lets call it "Empty Line Break". 


2) Adding an empty line break column won't just add a line break. This column should have some text to create a line break, so you need to add some value to this column in workflow. So let's set this ~ pattern into "Empty Line Break" field in workflow (Update List Item workflow action).



3) Now in Update List Item workflow action, wherever line break is needed in the multi-line text field, add "Empty Line Break".



4) Using Regular Expression replace pattern ~ to an empty string and then store it in a output variable.



5) Update the output variable back to the Multi-Line text column where you needed the line break.



Again this is not the best solution, hope Nintex fixes this soon because it works fine in Nintex On Prem version.

Badge

Hi Everyone, i just found out the solution for this one. using a build string in nintex online. press enter to seperate first row to second row. then go back to the end of first row. then press ctrl + enter. that should do the trick 🙂 cheers.

@Matek28 


 


Thanks for the solution. It worked for me in Nintex O365. 


 


Regards,


Kavirana

Reply