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

Question

Question

Pattern matching remove leading commas and spaces and trailing commas and spaces

asked on January 29, 2021 • Show version history

I would like to take a field that has a list like this:

 

, , , , Friend, , employee, someone else

 

and make it look like this:

Friend, employee, someone else

 

The  field may have 1 or more leading commas and spaces and one or more trailing commas and spaces.  I would like to remove all leading and trailing commas and spaces.  Can I do that with pattern matching?

 

0 0

Replies

replied on January 29, 2021 • Show version history

Maybe with pattern matching, but a function is easy if you do the following:

  1. Add a Split function on the , character
  2. Add a Trim function to remove unnecessary whitespaces characters
  3. Add the Remove Empty Items function

 

Back in the token editor, check the indexing option and select all values separated by: Then enter comma followed by a space as the separator.

 

 

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

Sign in to reply to this post.