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

Question

Question

Is the Remove Token Function able to use Control Characters like the Split function?

asked on February 28, 2023

The title kind of says it all, but in Workflow 11 there is a Remove token function available, but there is no information about it in the online documentation. I thought it might work similar to the Split function in the ability to utilize Control Characters, but it doesn't appear to in my testing, but I wanted to verify that.

If it can't, what is the best way to remove Control Characters from a token, specifically CR LF?

1 0

Answer

SELECTED ANSWER
replied on February 28, 2023

The Remove function will remove matching values from a multi-value token.

In this example, we have one token with a series of values saying One, Two, or Three.

Then we run the Remove function to remove the One values.

The end result is just the Two and Three values remaining.

 

For removing CR LF, I usually use a Pattern Matching activity to gather everything except the \r and \n elements.

If you set it to "All matches (combined with no space)" you'll get a single token like the one shown in the screenshot.

But if you set it to "All matches (as a multi-value token)" you'll get a multi-value token, which you can then use the Index function of the token editor to do different separators (like space or semi-colon).

A little annoying to use two activities for it, but it gets the job done, and I've effectively replaced the line breaks with semi-colons in this example.

1 0
replied on March 1, 2023

Thank you for running through that Matthew.

1 0
replied on March 1, 2023

You are very welcome.

0 0

Replies

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

Sign in to reply to this post.