"[SOLVED] How to Split an Attribute and Keep the Split Character?"
jan_kvacek
MemberPosts:4Contributor I
Hello!
I have a trubble with splitting attributes in Rapidminer Studio. My attribute looks like this:
"A002W0541G001"
I need to split it to several new attributes:
"A002" "W0541" "G001" and so on.
But Split always dropps the character I use to determine where to split the original attribute. Is there any way to keep it?
Thank you for help!
Jan
I have a trubble with splitting attributes in Rapidminer Studio. My attribute looks like this:
"A002W0541G001"
I need to split it to several new attributes:
"A002" "W0541" "G001" and so on.
But Split always dropps the character I use to determine where to split the original attribute. Is there any way to keep it?
Thank you for help!
Jan
Tagged:
0
Answers
Dortmund, Germany
Assuming you have a pattern of [Letter+Numbers][Letter+Numbers] then this works: "(?<=[0-9]++)(.*?)(?=[A-Z])"
Negative lookbehind to check there are numbers before, lookahead to check for the letter. Anything inbetween is used to split.
Sample process below: