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

Question

Question

Split token on carriage return

asked on May 6, 2016 Show version history

I am using the Retrieve Document Text element in workflow and I get the output like this.


|B151106-08PBOI1|RSD|DUCK|DONALD|D|DUCK DONALD D|
|B151106-08PBOI1|RSD|LAST|FIRST|M|LAST FIRST M|
|B151106-08PBOI1|ID|Huan, Don|
|B151106-08PBOI1|ID|Last, First|

 

 

I want to make each line its own token so I can then move each line into a database for a third party program.  This file could have three lines or more up to fourteen.  Essentially I would like to split on a carriage return.  I have tried putting /r/n into split and several variations of regular expressions.

 

I'm sure I am missing something obvious but how can I do this?

Thanks in advance.

 

0 0

Replies

replied on July 26, 2016

Actually it was really obvious.  Use the Pattern Matching tool.  This allows you to use multiple matches from the input.  Hopefully this helps someone else.

2 0
replied on May 7, 2016

Regular expression controls use backwards slashes. Try using [\r\n].

1 0
replied on May 30, 2019

Aha, this was bugging me too. I said split on \r, \n, or \r\n and nothing worked, it looks like it works because the token view splits on \r\n also. I could understand if split did not support more than one character, but it should at least split when it finds \r or \n if I only define those. Maybe it is taking the input literally, I think it is time for 102 keys, so we can have a new line key.

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

Sign in to reply to this post.