Skip to main content
Solved

Help with configuring attribute splitter to skip specific delimiters

  • July 22, 2022
  • 4 replies
  • 37 views

I'm having trouble using AttributeSplitter to split everything with a semicolon as delimiter, EXPCEPT skip seimcolon's that are within parentheses. Please help! Thanks!

 

Example 1424462 (EXT: 1488296; 1491537); 1428106; 1436651; 1436653

 

What I need is:

1424462 (EXT: 1488296; 1491537)

1428106

1436651

1436653

 

Best answer by dustin

Here is a possible solution, although it assumes the parenthesis will be in the first list element. I've attached my test workbench that you could copy the transformers from.image

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • Best Answer
  • July 22, 2022

Here is a possible solution, although it assumes the parenthesis will be in the first list element. I've attached my test workbench that you could copy the transformers from.image


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • July 22, 2022

I would usually do something like regex to replace the delimiters outside the brackets with a different delimiter with a StringReplacer and then use that in the attribute splitter

 

I think this should match semi colons outside of brackets

;(?=(((?!\)).)*\()|[^\(\)]*$)

 


  • Author
  • 1 reply
  • July 22, 2022

Here is a possible solution, although it assumes the parenthesis will be in the first list element. I've attached my test workbench that you could copy the transformers from.image

This worked! Thank you very much!


Forum|alt.badge.img+2
  • 1891 replies
  • July 22, 2022

@bgossett127​ or a single StringReplacer with the regex ( \\(EXT:([ 0-9]+;?)+\\)) replaced with <blank> to remove the extensions and then followed by the AttributeSplitter to split the remaining string