You are viewing limited content. For full access, please sign in.

Question

Question

Regular Expression to Remove Line Break Characters

asked on June 19, 2019

I have a token that has a line break characters in the value. 

Example input value:

Wine and Beer Permit
Package Store Tasting Permit

Desired value:

Wine and Beer Permit Package Store Tasting Permit

 

I was wondering if there was a Regular Expression to remove the \r\n and make it all on a single line.

Thanks for any ideas!

Pete

0 0

Replies

replied on June 19, 2019

Is this in Quick Fields or Workflow?

0 0
replied on June 19, 2019

Workflow

0 0
replied on June 21, 2019

This is how it looks in workflow 

Need the output to be: 

BQ_Wine_and_Beer_Retailer_s_Off-Premise_PermitPS_Package_Store_Tasting_Permit

0 0
replied on June 21, 2019
0 0
replied on June 21, 2019

Tried it but still no luck.  Pattern doesn't work.  

Anyone else have any ideas?

0 0
replied on June 21, 2019

The variables look like this in Forms

and this when they are in workflow

0 0
replied on June 21, 2019 Show version history

EDIT: Are you dealing with a checkbox field? If so, that makes a very big difference. A checkbox is not "technically" separated by line breaks, it is a multi-value token.

 

You need to use Pattern Matching, not just the token editor.

0 0
replied on June 21, 2019

Yes I am.  I'm using pattern matching.  I get this result every time.

Can't figure out why is is not showing the result as:

BQ_Wine_and_Beer_Retailer_s_Off-Premise_PermitPS_Package_Store_Tasting_Permit

It shows correctly in the testing area.

0 0
replied on June 21, 2019

If it is a checkbox, then it is a multivalue token, which is very different. There wouldn't actually be any line break characters in the content, it just "looks" that way because it is showing all the different values.

Notice that the Forms variable doesn't actually have line breaks.

You need to treat it like a multivalue token, which means you either need to loop through it using a For Each Row and append each value to a token, or you need to flatten it before you do the pattern matching.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.