cancel
Showing results for 
Search instead for 
Did you mean: 
furstlars
Nintex Newbie

Regex - How Do I Add A Line Break?

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

Labels: (1)
Tags (2)
0 Kudos
Reply
2 Replies
Highlighted
Community Manager Community Manager
Community Manager

Re: Regex - How Do I Add A Line Break?

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. 

0 Kudos
Reply
RanjithKunjayi
Nintex Newbie

Re: Regex - How Do I Add A Line Break?

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 [\r\n], \n, <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).

TestCapture.PNG

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

testCapture1.PNG

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

test1Capture.PNG

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

Capture3.PNG

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

0 Kudos
Reply